Rejecting Emails at SMTP Level

Revision as of 06:58, 27 December 2011 by Irfan (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 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".

Jump to: navigation, search