Rejecting Emails at SMTP Level

Rejecting Emails at SMTP Level

If a sender is blacklisted using, 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.   REJECT
 *     REJECT

2. Add following as 2nd line in /opt/zimbra/conf/ 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