Alex: > Hi, > I'm having trouble figuring out why this header check doesn't reject a > mailer-daemon bounce email with ".lan" in the From address: > > /^From:.*\.lan>$/ REJECT Invalid domain > > It works if I use postmap directly, but not when the bounce message is > received. Does it have something to do with it being a bounce message? > > $ postmap -q 'From: Mail Delivery System > <mailer-dae...@smtp03.nrtc.email-ash1.sync.lan>' > pcre:/etc/postfix-110/header_checks.pcre > REJECT Invalid domain > > /etc/postfix-110/main.cf: > header_checks = regexp:/etc/postfix-110/header_checks > pcre:$config_directory/header_checks.pcre
Have you tried: postmap -q 'From...' regexp:/etc/postfix-110/header_checks If there is a match with the regexp: table, then the pcre: table will not be queried. Wietse