header_checks not working

koby

Renowned Member
Jun 21, 2012
135
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
 
Not sure about header_checks but you can use mail filter with what object -> match field to quarantine/block mails.

1620949090451.png
 
  • Like
Reactions: Stoiko Ivanov
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
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!