Transport Table for external servers: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
Configuring transport tables to relay all emails to an different mail server. In this example I am forwarding all emails for otherdomain.com to smtp.otherdomain.com . You can add many transport maps as per your need. All commands should be run as Zimbra. Please check for 5.x instructions described inline.
Configuring transport tables to relay all emails to an different mail server. In this example I am forwarding all emails for otherdomain.com to smtp.otherdomain.com . You can add many transport maps as per your need. All commands should be run as Zimbra. After 5.0.9, postfix_transport_maps has been modified, please check instructions for 5.0.9 inline.


  ''$ zmlocalconfig  |grep -i postfix_transport_maps''
  ''$ zmlocalconfig  |grep -i postfix_transport_maps''


This will show you current transport maps file configuration (4.x).
This will show you current transport maps file configuration.


  ''postfix_transport_maps = ldap:/opt/zimbra/conf/ldap-transport.cf''
  ''postfix_transport_maps = ldap:/opt/zimbra/conf/ldap-transport.cf''


On 5.x Systems
On 5.0.9 Systems
  ''postfix_transport_maps = proxy:ldap:/opt/zimbra/conf/ldap-transport.cf''
  ''postfix_transport_maps = proxy:ldap:/opt/zimbra/conf/ldap-transport.cf''


Line 19: Line 19:
  ''$ postmap /opt/zimbra/postfix/conf/transportfile''
  ''$ postmap /opt/zimbra/postfix/conf/transportfile''


Define new transport file instead of the default one (4.x).
Defining new transport file BEFORE of the default one.


  ''$ zmlocalconfig -e postfix_transport_maps=hash:/opt/zimbra/postfix/conf/yourtransportfile,ldap:/opt/zimbra/conf/ldap-transport.cf''
  ''$ zmlocalconfig -e postfix_transport_maps=hash:/opt/zimbra/postfix/conf/yourtransportfile,ldap:/opt/zimbra/conf/ldap-transport.cf''


For 5.x
For 5.0.9


  ''$ zmlocalconfig -e postfix_transport_maps=hash:/opt/zimbra/postfix/conf/yourtransportfile,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf''
  ''$ zmlocalconfig -e postfix_transport_maps=hash:/opt/zimbra/postfix/conf/yourtransportfile,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf''

Revision as of 10:04, 7 September 2008

Configuring transport tables to relay all emails to an different mail server. In this example I am forwarding all emails for otherdomain.com to smtp.otherdomain.com . You can add many transport maps as per your need. All commands should be run as Zimbra. After 5.0.9, postfix_transport_maps has been modified, please check instructions for 5.0.9 inline.

$ zmlocalconfig   |grep -i postfix_transport_maps

This will show you current transport maps file configuration.

postfix_transport_maps = ldap:/opt/zimbra/conf/ldap-transport.cf

On 5.0.9 Systems

postfix_transport_maps = proxy:ldap:/opt/zimbra/conf/ldap-transport.cf

Create your transport file (owner/group-owner should be zimbra). You can also add multiple transport maps.

vi /opt/zimbra/postfix/conf/transportfile
otherdomain.com     :[smtp.otherdomain.com]

Convert the transport file into maptype database file.

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

Defining new transport file BEFORE of the default one.

$ zmlocalconfig -e postfix_transport_maps=hash:/opt/zimbra/postfix/conf/yourtransportfile,ldap:/opt/zimbra/conf/ldap-transport.cf

For 5.0.9

$ zmlocalconfig -e postfix_transport_maps=hash:/opt/zimbra/postfix/conf/yourtransportfile,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf

Restart Zimbra

zmcontrol stop
zmcontrol start

This will forward all emails for otherdomain.com and its subdomains to host smtp.otherdomain.com However you'll need to be careful at zimbra upgrades. The modification will be overwritten by the upgrade. If you still not able to set the correct transport tables, contact Zimbra Support.

Jump to: navigation, search