How to block top level domain(TLD) in Zimbra

How to block top level domain(TLD) in Zimbra

   KB 24438        Last updated on 2023-05-7  

(0 votes)


How to block top level domain(TLD) in Zimbra?


1. Create a “” file and add the TLD to block.

$ vim /opt/zimbra/common/conf/
/\.icu$/   REJECT
/\.site$/  REJECT
/\.host$/  REJECT
/\.fun$/   REJECT

Save the file.

2. Now take the backup of file before adding new line.

$ cp /opt/zimbra/conf/ /opt/zimbra/conf/

Open “/opt/zimbra/conf/” file and go to the MTA section or search “SECTION mta DEPENDS amavis”.

3. Add following line as per the screenshot:

$ vim /opt/zimbra/conf/
REWRITE common/conf/ common/conf/

Zmconfigd cf.png

Save the file.

4. Take the backup of following file.

$ cp /opt/zimbra/conf/zmconfigd/ /opt/zimbra/conf/zmconfigd/

5. Open the file “/opt/zimbra/conf/zmconfigd/” and add the following line as per screenshot.

$ vim /opt/zimbra/conf/zmconfigd/
%%contains VAR:zimbraServiceEnabled mta^ check_sender_access regexp:/opt/zimbra/common/conf/

Smtpd sender restrictions.png

6.Restart the mta service and verify the changes.

$ zmmtactl restart
$ postconf -n | grep -i smtpd_sender_restrictions

The file path "regexp:/opt/zimbra/common/conf/" should be there.

Note: This is the Postfix level customization, which is not supported by Zimbra and it will not remain same after an upgrade the server. Please follow the above steps in test environment first then apply on production.

Jump to: navigation, search