On 3/12/2015 7:31 AM, Krinninger, Reinhold wrote: > Hello, > > > > i'm trying to stop some spammails with a header_check. The > header_check looks for the hostname of our smtp-server in the > "From:"-Line in the headers of incoming mail. I want to reject all > Mails with this or similar "From:" Lines: > > > > From: "DHL Team" m8148012...@itmu-smtp2.br.de > <mailto:m8148012...@itmu-smtp2.br.de> > > > > Where "itmu-smtp2.br.de" is the hostname of our smtp-server. > > > > i use this header_check: > > /etc/postfix/header_checks: > > /^From: (?!.*\<root).*\@itmu\-smtp2\.br\.de\>/ REJECT seems to be > spam, isn't it?
Simplify... /^From: .*root@itu-smtp2\.br\.de/ WARN /^From: .*@itu-smtp2\.br\.de/ REJECT invalid hostname in From: header > > /^From: .*\@.*/ WARN /^From: / WARN > > > > the first line should reject all spammails as described above, the > second line should log all "From: " lines in the maillog with a > warning from all mails, which passed the first line. > > What i see is, that the second line works as expected, the problem > is the first line. None of the spammails with this or similar > "From:"-Lines gets rejected and I see no message in the message-log. > When i try local with telnet or a mailclient the header_check works > as expected and the testmail gets rejected. I have no idea whats > wrong, any ideas from you would appreciated. > > We use Postfix 2.11 on RHEL6 64bit. > > > > Best Regards > > Reinhold Krinninger > > > > > > > -------------------------------------------------------------------------------------------------- > > > > Bayerischer Rundfunk; Rundfunkplatz 1; 80335 München > > > Telefon: +49 89 590001; E-Mail: i...@br.de; Website: http://www.BR.de > >