Domain level blocking of users

Revision as of 08:15, 20 February 2010 by Gettyless (talk | contribs)

Below mentioned are the steps to "REJECT" an external email address from sending mail to the users of the Zimbra Domain.

The same results can also be achieved using Amavis via blacklisting.

1. Edit

 vi /opt/zimbra/conf/

Add this line below (smtpd_recipient_restrictions):

 POSTCONF smtpd_sender_restrictions FILE

2. Create file /opt/zimbra/conf/ with the below line:



 echo "hash:/opt/zimbra/postfix/conf/reject" > /opt/zimbra/conf/

3. Create file /opt/zimbra/postfix/conf/reject with the list of email address to be rejected in the below format:     REJECT

4. postmap it and restart postfix

 postmap /opt/zimbra/postfix/conf/reject
 zmmtactl stop && zmmtactl start

You'll be able to see the changes show up in /opt/zimbra/log/zmmtaconfig.log .

Please note that this change will not survive an upgrade and you will have to redo these after the upgrade.

Reject messages will be logged in /var/log/zimbra.log ; format looks like this:

[date / hostname] postfix/smtpd[####] NOQUEUE: reject: RCPT from [remote mta]: 554 5.7.1 <senders-email@DOMAIN>: 
Sender address rejected: Access denied: from=<senders-email@DOMAIN> to=<local-zimbra-user@domain> proto=ESMTP helo=<remote mta>

The sender will receive a returned email declaring the rejection.

Verified Against: Unknown Date Created: 10/29/2008
Article ID: Date Modified: 2010-02-20

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search