Domain level blocking of users: Difference between revisions
mNo edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
The same results can also be achieved using Amavis via [http://wiki.zimbra.com/index.php?title=Improving_Anti-spam_system#Implementing_Whitelist.2FBlacklist blacklisting]. | The same results can also be achieved using Amavis via [http://wiki.zimbra.com/index.php?title=Improving_Anti-spam_system#Implementing_Whitelist.2FBlacklist blacklisting]. | ||
1. Edit /opt/zimbra/conf/zmmta.cf | 1. Edit zmmta.cf | ||
vi /opt/zimbra/conf/zmmta.cf | |||
Add this line below (smtpd_recipient_restrictions): | |||
POSTCONF smtpd_sender_restrictions FILE postfix_sender_restrictions.cf | |||
2. Create file /opt/zimbra/conf/postfix_sender_restrictions.cf with the below line: | 2. Create file /opt/zimbra/conf/postfix_sender_restrictions.cf with the below line: | ||
hash:/opt/zimbra/postfix/conf/reject | hash:/opt/zimbra/postfix/conf/reject | ||
or: | |||
echo "hash:/opt/zimbra/postfix/conf/reject" > /opt/zimbra/conf/postfix_sender_restrictions.cf | |||
3. Create file /opt/zimbra/postfix/conf/reject with the list of email address to be rejected in the below format: | 3. Create file /opt/zimbra/postfix/conf/reject with the list of email address to be rejected in the below format: | ||
user@domain.com REJECT | user@domain.com REJECT | ||
4. postmap /opt/zimbra/postfix/conf/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 . | You'll be able to see the changes show up in <tt>/opt/zimbra/log/zmmtaconfig.log</tt> . | ||
Please note that this change will not survive an upgrade and you will have to redo these after the upgrade. | 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: | Reject messages will be logged in <tt>/var/log/zimbra.log</tt> ; format looks like this: | ||
[date / hostname] postfix/smtpd[####] NOQUEUE: reject: RCPT from [remote mta]: 554 5.7.1 <senders-email@DOMAIN>: | [date / hostname] postfix/smtpd[####] NOQUEUE: reject: RCPT from [remote mta]: 554 5.7.1 <senders-email@DOMAIN>: |
Revision as of 08:15, 20 February 2010
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 zmmta.cf
vi /opt/zimbra/conf/zmmta.cf
Add this line below (smtpd_recipient_restrictions):
POSTCONF smtpd_sender_restrictions FILE postfix_sender_restrictions.cf
2. Create file /opt/zimbra/conf/postfix_sender_restrictions.cf with the below line:
hash:/opt/zimbra/postfix/conf/reject
or:
echo "hash:/opt/zimbra/postfix/conf/reject" > /opt/zimbra/conf/postfix_sender_restrictions.cf
3. Create file /opt/zimbra/postfix/conf/reject with the list of email address to be rejected in the below format:
user@domain.com 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.