View Single Post
  #15 (permalink)  
Old 10-12-2007, 01:03 PM
dlochart dlochart is offline
Advanced Member
 
Posts: 177
Default

I am putting this up to show what I did to allow the Zimbra MTA to server as a gateway to some domains while remain primary to others. This may not be the optimal solution and it deviates from the split domain approach defined in the WIKI. I am not a system admin/email admin but learning all of this on the fly so bear this in mind. It works for us.

Mail Gateway Setup
Setup to allow the Zimbra MTA to act as a gateway to an Exchange Server without validating the recipient email address at the MTA.

Configure relay domain

This is where you place the domains to be relayed. This is changed in the main.cf config file under /opt/zimbra/postfix/conf directory

relay_domains=example.com

Create a transport map.
You need to create a transport map that basically maps the domains specified by relay_domains to a protocol and destination. This tells Postfix what to do with mail for a specific domain. For my implementation I will name the transport file “relay_domain_transport”. I simply copied the transport file in /opt/zimbra/postfix/conf to this name and at the bottom added this line:

example.com smtp:[10.129.1.13]

Make sure place the ip address in brackets. This prevents DNS lookups on the domain and will prevent infinite looping.

After saving the file then you must compile the map into a .db file (for hash access)

/opt/zimbra/postfix/sbin/postmap relay_domain_transport

Add the new transport map to the transport_maps parameter in the main.cf. This is only a temporary solution used for testing connectivity and flow. Once you are satisfied you will need to modify the localconfig.xml (see below)
transport_maps= hash:/opt/zimbra/postfix/conf/relay_domain_transport,ldap:/opt/zimbra/conf/ldap-transport.cf
To make this change last across postfix restarts we need to modify the localconfig.xml file. This file is used in generating configuration files.

Edit /opt/zimbra/conf/localconfig.xml. Look for “ postfix_transport_maps “. Add hash:/opt/zimbra/postfix/conf/relay_domain_transport to the beginning like so.

<key name="postfix_transport_maps">
<value>hash:/opt/zimbra/postfix/conf/relay_domain_transport,ldap:/opt/zimbra/conf/ldap-transport.cf</value>
</key>

Allow Outbound Mail
If your secondary (Exchange) server will send mail out through the Zimbra MTA then you need to add the IP Address of the Exchange Server to your mynetworks parameter in the main.cf config file.

mynetworks = 127.0.0.1/32, 10.129.1.13/32

Voila!
Reply With Quote