How could I block outgoing mail to a specific address using Postfix?
I've partially managed to block outgoing e-mail using header_checks
. However, header_checks
doesn’t cover BCC.
I also tested this solution: http://www.linuxmail.info/postfix-restrict-sender-recipient/
but it didn’t work.
Best Answer
As described in access(5), just add a check_recipient_access map to your smtpd_recipient_restrictions; if you wish to block these recipients for your own users too, make sure to place it before permit_mynetworks and/or permit_sasl_authenticated.
And in /etc/postfix/bad_recipients: