How To Block Email Using Subject Headers In Postfix

Author: , December 7th, 2021

I needed to block email based on the Subject header. The solution is simple: Edit as root and uncomment or add:

Next, creaate or edit /etc/postfix/header_checks as root and add the following line:

Finally, run sudo postfix reload NOTE: Do NOT add the “i” after the regular expression! It is case-insensitive by […]

How To Block/Reject Email From Or To A Specific Address Using Postfix On CentOS

Author: , June 3rd, 2011

By default, the Postfix SMTP server accepts any sender address. You block email addresses using the sender_access file:

How To Reject By Email Address In Postfix

Author: , December 17th, 2010

Edit /etc/postfix/access and add entries like: 550 No such user here Then run the following command: postmap /etc/postfix/access Edit /etc/postfix/ smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/access, {any other options already there…} Then run the following command: postfix reload