In order to forbid your users to send emails to a single email address or to a whole domain you specify one or more postfix transport rules. To do so on Zimbra 7.1.3 follow this steps:
1. Create a new file called “postfix_transport” in /opt/zimbra/conf/
2. Enter the email addresses and domains you want to block in the following format:
firstname.lastname@example.org error: Forbidden Recipient Address domain.com error: Forbidden Recipient Domain
(you can change the error message after “error:” with one of your choice)
3. Save and close the file
4. Use postmap to create a lookup table based on the file you just created (run the command as the ‘zimbra’ user)
5. Edit the localconfig.xml file to add the contents of the lookup table to the “postfix_transport_maps” key
<key name="postfix_transport_maps"> <value>proxy:ldap:/opt/zimbra/conf/ldap-transport.cf</value> </key>
<key name="postfix_transport_maps"> <value>hash:/opt/zimbra/conf/postfix_transport, proxy:ldap:/opt/zimbra/conf/ldap-transport.cf</value> </key>
6. Save the file and exit.
7. Wait for the MTA service to restart automatically (or restart it manually running `zmmtactl restart` as the zimbra user)
You can now check the main.cf file to see if the change has been correctly applied and the zmconfigd.log/zimbra.log files to see if there is any error related to the new setting.
Should you need to add more forbidden addresses/domains, remember to run the `postmap` command I previously mentioned every time to make any change to the postfix_transport file, otherwise the changes won’t be taken into account by Zimbra.