Transport Table for external servers

From Zimbra :: Wiki

Jump to: navigation, search
   Icon-Archive.png  - This is archive documentation, which means it is not supported or valid for recent versions of Zimbra Collaboration.


Admin Article

Article Information

This article applies to the following ZCS versions.
  ZCS 6.0 Article  ZCS 6.0
  ZCS 5.0 Article  ZCS 5.0

Configuring transport tables to relay emails to a different mail server. In this example I am forwarding all emails for to . You can add as many transport maps as you need. All commands should be run as a user 'zimbra'. After 5.0.9, postfix_transport_maps has been modified a bit, so we'll show both ways.

$ zmlocalconfig   |grep -i postfix_transport_maps

This will show you the current transport maps file configuration:

postfix_transport_maps = ldap:/opt/zimbra/conf/

or for Zimbra 5.0.9 and higher (including 6.0):

postfix_transport_maps = proxy:ldap:/opt/zimbra/conf/

Create your transport file (owner/group-owner should be zimbra):

vi /opt/zimbra/postfix/conf/transportfile     :[]

You can also add multiple transport maps, for example:     :[]     :[]    :[]

In this example all emails for 3 different domains will go to, so destination will be changed, while user name will remain as in original email address.

Convert the transport file into maptype database file:

$ postmap /opt/zimbra/postfix/conf/transportfile

The file transportfile.db will be created in this directory. Define the new transport file (original, not *.db one) BEFORE the default one. Run:

$ zmlocalconfig -e postfix_transport_maps="hash:/opt/zimbra/postfix/conf/transportfile ldap:/opt/zimbra/conf/"

Or for Zimbra 5.0.9 and higher:

$ zmlocalconfig -e postfix_transport_maps="hash:/opt/zimbra/postfix/conf/transportfile proxy:ldap:/opt/zimbra/conf/"

Finally, make sure that the relay_domains parameter in contains all domains handled by the server, whether locally or relayed elsewhere:

$ vi /opt/zimbra/postfix/conf/
relay_domains =,,,,,

Restart Zimbra:

zmcontrol stop
zmcontrol start

This will forward all emails for the example domains and subdomains to host while allowing local domains to continue to be delivered locally. However you'll need to be careful at zimbra upgrades. The modification to for relay_domains will be overwritten by the upgrade. If you still not able to set the correct transport tables, contact Zimbra Support.

Verified Against: ZCS 5.0.9 Date Created: 08/13/2008
Article ID: Date Modified: 03/27/2015

Verified Against: ZCS 6.0.5 Date Created: 04/07/2010
Article ID: Date Modified: 03/27/2015
Personal tools