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

By default, the Postfix SMTP server accepts any sender address. You block email addresses using the sender_access
file:
1 2 3 4 5 6 7 8 9 10 11 12 |
# cd /etc/postfix # vi sender_access baduser@baddomain.com REJECT # postmap hash:sender_access # vi recipient_access baduser@baddomain.com REJECT # postmap hash:recipient_access # vi main.cf smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_access (make sure these are the FIRST entry on the lines) # /etc/init.d/postfix restart |
Angel said on April 15, 2013, 6:39 pm:
How can I prevent that an specific user send emails to another specific user?
Help please.