[Postfixbuch-users] header_checks

Helmut Schneider jumper99 at gmx.de
Mo Mär 4 20:47:29 CET 2013


Peer Heinlein wrote:

> Am 03.03.2013 19:23, schrieb Helmut Schneider:
> > Gibt es irgendetwas in der master.cf zu beachten? Postfix schert
> > sich nämlich nicht um die header_checks. Ein manueller Aufruf
> > klappt:
> > 
> > helmut at ubuntu:~$ postmap -q "From: <user at domain.tld"
> > pcre:/etc/postfix/header_checks
> > REJECT  Works!!
> > helmut at ubuntu:~$
> > 
> > /etc/postfix/header_checks is gepostmapped.
> 
> b) Steht das WIRKLICH so im Mailheader?

Hm, ich hab wohl was nicht verstanden: Weder "/To:/", noch "/From:/"
matchen, "/Received:/" aber sehr wohl:

/From:/     WARN    Works with From:!!
/To:/       WARN    Works with To:!!
/Received:/ WARN    Works with Received:!!
/./         WARN    Works with catchall!!

Mar  4 20:35:00 ubuntu postfix/postscreen[10077]: CONNECT from
[127.0.0.1]:54453 to [127.0.0.1]:25
Mar  4 20:35:00 ubuntu postfix/postscreen[10077]: WHITELISTED
[127.0.0.1]:54453
Mar  4 20:35:00 ubuntu postfix/smtpd[10078]: connect from
localhost[127.0.0.1]
Mar  4 20:35:16 ubuntu postfix/smtpd[10078]: 8EC281F7:
client=localhost[127.0.0.1]
Mar  4 20:35:21 ubuntu postfix/cleanup[10132]: 8EC281F7: warning:
header Received: from ubuntu (localhost [127.0.0.1])??by ubuntu
(Postfix) with SMTP id 8EC281F7??for <helmut@>; Mon,  4 Mar 2013
20:35:07 +0100 (CET) from localhost[127.0.0.1]; from=<root at ubuntu>
to=<helmut@> proto=SMTP helo=<ubuntu>: Works with Received:!!
Mar  4 20:35:21 ubuntu postfix/cleanup[10132]: 8EC281F7:
message-id=<20130304193516.8EC281F7 at ubuntu>
Mar  4 20:35:21 ubuntu postfix/qmgr[10075]: 8EC281F7:
from=<root at ubuntu>, size=343, nrcpt=1 (queue active)
Mar  4 20:35:21 ubuntu postfix/smtp[10133]: 8EC281F7: to=<helmut@>,
relay=zeus[192.168.124.254]:25, delay=14, delays=14/0.01/0/0.23,
dsn=2.6.0, status=sent (250 2.6.0 <20130304193516.8EC281F7 at ubuntu>
[InternalId=1079] Queued mail for delivery)
Mar  4 20:35:21 ubuntu postfix/qmgr[10075]: 8EC281F7: removed

Ich teste "telnet localhost 25", liegt es daran?! Meine aktuelle
master.cf sieht so aus (und ja, ich weiss kaum was ich tue, die
master.cf hab ich noch nie verstanden).:

#This is the before-queue smtpd, it forwards mail to amavisd to port
10024
smtp      inet  n       -       y       -       10       smtpd
##      -o smtpd_proxy_filter=filter
#       -o content_filter=filter:postfix_header_check_test
#       -o smtp_send_xforward_command=yes
        -o smtp_header_checks=pcre:/etc/postfix/header_checks

#This is the after-filter smtpd, it receives mail from amavisd to port
10025
127.0.0.1:10025 inet n    -       y       -       -     smtpd
        -o content_filter=
        -o smtpd_delay_reject=no
        -o smtpd_client_restrictions=permit_mynetworks,reject
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o smtpd_data_restrictions=reject_unauth_pipelining
        -o smtpd_end_of_data_restrictions=
        -o smtpd_restriction_classes=
        -o mynetworks=127.0.0.0/8
        -o smtpd_error_sleep_time=0
        -o smtpd_soft_error_limit=1001
        -o smtpd_hard_error_limit=1000
        -o smtpd_client_connection_count_limit=0
        -o smtpd_client_connection_rate_limit=0
        -o
receive_override_options=no_header_body_checks,no_unknown_recipient_chec
ks,no_milters
        -o local_header_rewrite_clients=

##This is postscreen
smtp      inet  n       -       y       -       1       postscreen
smtpd     pass  -       -       y       -       -       smtpd
#       -o content_filter=filter:dummy
#       -o smtp_send_xforward_command=yes
#       -o smtp_header_checks=pcre:/etc/postfix/header_checks
dnsblog   unix  -       -       y       -       0       dnsblog
tlsproxy  unix  -       -       y       -       0       tlsproxy




Mehr Informationen über die Mailingliste Postfixbuch-users