Answer the question
In order to leave comments, you need to log in
How to disable sending emails to a specific list of addresses in postfix?
We have a postfix mail server and it became necessary to prohibit everyone from sending letters to a certain list of addresses. How to organize? Google suggests how to prevent sending to a list of domains, but not a list of addresses.
Answer the question
In order to leave comments, you need to log in
See smtpd_recipient_restrictions , in particular check_recipient_access . The file format is described in man 5 access .
submission inet n - n - - smtpd
-o syslog_name=postfix/submission
-o smtpd_recipient_restrictions=$mua_recipient_restrictions
smtps inet n - n - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_recipient_restrictions=$mua_recipient_restrictions
mua_recipient_restrictions = check_recipient_access hash:/etc/postfix/blacklist
[email protected] REJECT
[email protected] REJECT
postmap /etc/postfix/blacklist
postfix reload
I think I need to play around with header_checks
/^To:[email protected]/ REJECT
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question