Hello Shashikant!
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:
- Create a new file called "postfix_transport" in /opt/zimbra/conf/
- Enter the email addresses and domains you want to block in the following format:
Code:
email@domain.com error: Forbidden Recipient Address
domain.com error: Forbidden Recipient Domain
(you can change the error message after "error:" with one of your choice)
- Save and close the file
- Use postmap to create a lookup table based on the file you just created (run the command as the 'zimbra' user)
Code:
postmap /opt/zimbra/conf/postfix_transport
- Edit the localconfig.xml file to add the contents of the lookup table to the "postfix_transport_maps" key
change:
Code:
<key name="postfix_transport_maps">
<value>proxy:ldap:/opt/zimbra/conf/ldap-transport.cf</value>
</key>
to:
Code:
<key name="postfix_transport_maps">
<value>hash:/opt/zimbra/conf/postfix_transport, proxy:ldap:/opt/zimbra/conf/ldap-transport.cf</value>
</key>
- Save the file and exit.
- 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.
Have a nice day,
Cine
the ZeXtras Team
Bookmarks