How To Disable Email Bounce Messages In Postfix
1 2 3 |
vi /etc/postfix/master.cf bounce unix - - n - 0 discard defer unix - - n - 0 discard |
1 2 3 |
vi /etc/postfix/master.cf bounce unix - - n - 0 discard defer unix - - n - 0 discard |
I needed to block email based on the Subject header. The solution is simple: Edit main.cf as root and uncomment or add:
1 |
header_checks = regexp:/etc/postfix/header_checks |
Next, creaate or edit /etc/postfix/header_checks as root and add the following line:
1 2 |
/subject:\sbad subject text here/ REJECT header_checks NO SPAM ALLOWED /subject:\stest subject text here/ DISCARD header_checks NO SPAM ALLOWED |
Finally, run sudo postfix reload NOTE: Do NOT add the “i” after the regular expression! It is case-insensitive by […]