header_checks not working

koby

Renowned Member
Jun 21, 2012
138
4
83
Natanya , Israel
Hello Guys ,
I am trying to implement header_checks on my systems ,
I did this on the templates ...
I did add "header_checks = regexp:/etc/postfix/header_checks"
add file "/etc/postfix/header_checks" in the correct location with "/^Subject:.*test/ REJECT"
inside of it , did a "service postfix restart"
So far no errors.

But ,when I get mail , it is seems that postfix ignore my setting and nothing on the log.
I send mail with "test" as subject that should be rejected , but no rejecting...

Please advice

Best regards,
Koby Peleg Hen
 
Hello Hata_ph ,
My origin problem was the ability to create complicated rule such as form ex. :
if "from:=*@gmail.com" + "subject:=dhl" then block ==> (which can not be created by the gui on the system)
After I understand that header_checks is not working because an override on the master.cf (I found it after a deep dig into postfix)
than I decided to use spamassassin engine and it is work very good.

Thank you for you reply.
Best Regards ,
Koby Peleg Hen
 
Another option is to create spamassassin rules under /etc/mail/spamassasin/custom.cf.

1620993201431.png
 
I am now seeking to find who can I split this custom file into multiple file let say phishing.cf , dhl.cf etc...

Best Regards ,
Koby Peleg Hen