Block incoming

--------

ZCS 8.7 and later

 user@domain.com REJECT   domainX.com REJECT

zmprov ms 'yourzimbraservername' +zimbraMtaSmtpdSenderRestrictions "check_sender_access lmdb:/opt/zimbra/conf/postfix_reject_sender"

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

1

2

utube@saad.web.id REJECT

saad.com REJECT

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

-------