Rejecting Emails at SMTP Level: Difference between revisions
(Created page with "==Rejecting Emails at SMTP Level== If a sender is blacklisted using salocal.cf.in, postfix will accept the email and reject the emails when it reaches at amavisd scan. Many of a...") |
No edit summary |
||
Line 1: | Line 1: | ||
Rejecting Emails at SMTP Level | |||
If a sender is blacklisted using salocal.cf.in, postfix will accept the email and reject the emails when it reaches at amavisd scan. | If a sender is blacklisted using salocal.cf.in, postfix will accept the email and reject the emails when it reaches at amavisd scan. Admins prefer to block emails at SMTP level, so that emails will not even processed by postfix. This can be done using sender_access in smtpd_recipient_restrictions. | ||
1. Create /opt/zimbra/postfix/conf/sender_access file with users/domains you want to reject. | 1. Create /opt/zimbra/postfix/conf/sender_access file with users/domains you want to reject. |
Revision as of 06:59, 27 December 2011
Rejecting Emails at SMTP Level
If a sender is blacklisted using salocal.cf.in, postfix will accept the email and reject the emails when it reaches at amavisd scan. Admins prefer to block emails at SMTP level, so that emails will not even processed by postfix. This can be done using sender_access in smtpd_recipient_restrictions.
1. Create /opt/zimbra/postfix/conf/sender_access file with users/domains you want to reject.
user@domain.com REJECT *@domain2.com REJECT
2. Add following as 2nd line in /opt/zimbra/conf/postfix_recipient_restrictions.cf file.
check_sender_access hash:/opt/zimbra/postfix/conf/sender_access
3. Create hash and restart postfix
postmap /opt/zimbra/postfix/conf/sender_access postfix stop postfix start
Check /var/log/zimbra.log when you receive emails from blocked addresses. It will rejected with error 554 "Sender address rejected".