Block incoming
--------
ZCS 8.7 and later
Create file # vi /opt/zimbra/common/conf/postfix_reject_sender with the list of email addresses and domains to be rejected in the below format:
user@domain.com REJECT domainX.com REJECT
execute the zimbraMtaSmtpdSenderRestrictions
zmprov ms 'yourzimbraservername' +zimbraMtaSmtpdSenderRestrictions "check_sender_access lmdb:/opt/zimbra/conf/postfix_reject_sender"
postmap it
/opt/zimbra/common/sbin/postmap /opt/zimbra/conf/postfix_reject_sender
zmmtactl restart
How To Block Emails Or Domains On Zimbra 8 MTA
1. Create a postfix_reject_sender file with the following command
1
2
su - zimbra
vi /opt/zimbra/common/conf/postfix_reject_sender
Enter the email or domain that will be blocked according to the following example.
2. Enter the zimbraMtaSmtpdSenderRestrictions command
zmprov ms `zmhostname` +zimbraMtaSmtpdSenderRestrictions "check_sender_access lmdb:/opt/zimbra/common/conf/postfix_reject_sender"
3. Postmap the file you created using the following command
4. Restart MTA
1
postmap /opt/zimbra/common/conf/postfix_reject_sender
1
zmmtactl restart
5. To check zimbraMtaSmtpdSenderRestrictions successfully installed using the following command.
1
zmprov gs `zmhostname` | grep zimbraMtaSmtpdSenderRestrictions
If successful, it will appear as follows
zimbraMtaSmtpdSenderRestrictions: check_sender_access lmdb:/opt/zimbra/common/conf/postfix_reject_sender
Add emails in the block list
1. Enter the email you want to block
1
2
su - zimbra
vi /opt/zimbra/common/conf/postfix_reject_sender
2. Post folder long
1
postmap /opt/zimbra/common/conf/postfix_reject_sender
Rollback configuration
1. Enter the following command for rollback
zmprov ms `zmhostname` -zimbraMtaSmtpdSenderRestrictions "check_sender_access lmdb:/opt/zimbra/common/conf/postfix_reject_sender"
zmmtactl restart
-------