Hello Everyone!,
I manage a zimbra collaboration 8.8 server, multiple domains in there, one of them moved out of zimbra but there are some people who still email from internal domains and it still gets routed inside internal MTA, like Domain1, Domain2 are in zimbra, Domain 2 MX got moved outside zimbra but when Domain1 sends mail to Domain2 within zimbra, it still routes email to mailbox thats in Domain2 in zimbra. I want to configure in a way it sends to domain2 external where the MX is pointed.
how can i achieve it? or domain rename/deletion is the only way?
Routing Emails from internal domain to external domain
- JDunphy
- Outstanding Member
- Posts: 572
- Joined: Fri Sep 12, 2014 11:18 pm
- Location: Victoria, BC
- ZCS/ZD Version: 8.8.15_P20 RHEL6 Network Edition
- Contact:
Re: Routing Emails from internal domain to external domain
Should be able to do this with transport maps. Not tested but it would go something like this. Note: put the transport file where you think it makes the most sense for you and call it what you want. Could be in ~zimbra/common/conf with modern versions of Zimbra since that is where main.cf and master.cf are now located.
Where Transportfile is:
Should force a MX lookup with domain2 ... if not... you can specify it explicitly like smtp:host.domain2 and/or use [] around the mail host if MX lookups are problematical with your environment because of something like RFC1918 space or other DNS split horizon configurations.
Ref: http://www.postfix.org/transport.5.html
Code: Select all
# su - zimbra
% vi transportfile
% zmprov ms `zmhostname` zimbraMtaTransportMaps 'lmdb:/opt/zimbra/postfix/conf/transportfile proxy:ldap:/opt/zimbra/conf/ldap-transport.cf'
% zmprov gs `zmhostname` zimbraMtaTransportMaps
% postmap /opt/zimbra/postfix/conf/transportfile
% postfix reload
Where Transportfile is:
Code: Select all
domain2 smtp
Should force a MX lookup with domain2 ... if not... you can specify it explicitly like smtp:host.domain2 and/or use [] around the mail host if MX lookups are problematical with your environment because of something like RFC1918 space or other DNS split horizon configurations.
Ref: http://www.postfix.org/transport.5.html
Re: Routing Emails from internal domain to external domain
Thank you, I will try this out!
JDunphy wrote:Should be able to do this with transport maps. Not tested but it would go something like this. Note: put the transport file where you think it makes the most sense for you and call it what you want. Could be in ~zimbra/common/conf with modern versions of Zimbra since that is where main.cf and master.cf are now located.Code: Select all
# su - zimbra
% vi transportfile
% zmprov ms `zmhostname` zimbraMtaTransportMaps 'lmdb:/opt/zimbra/postfix/conf/transportfile proxy:ldap:/opt/zimbra/conf/ldap-transport.cf'
% zmprov gs `zmhostname` zimbraMtaTransportMaps
% postmap /opt/zimbra/postfix/conf/transportfile
% postfix reload
Where Transportfile is:Code: Select all
domain2 smtp
Should force a MX lookup with domain2 ... if not... you can specify it explicitly like smtp:host.domain2 and/or use [] around the mail host if MX lookups are problematical with your environment because of something like RFC1918 space or other DNS split horizon configurations.
Ref: http://www.postfix.org/transport.5.html
Re: Routing Emails from internal domain to external domain
How do I revert back to the original configuration once mapped the transportfile?
- JDunphy
- Outstanding Member
- Posts: 572
- Joined: Fri Sep 12, 2014 11:18 pm
- Location: Victoria, BC
- ZCS/ZD Version: 8.8.15_P20 RHEL6 Network Edition
- Contact:
Re: Routing Emails from internal domain to external domain
Two ways...
1) you have a blank transport file you postmapped so no lookup matches
2) you remove the transport file location and only use the ldap entry
ie) zmprov ms `zmhostname` zimbraMtaTransportMaps 'proxy:ldap:/opt/zimbra/conf/ldap-transport.cf'
1) you have a blank transport file you postmapped so no lookup matches
2) you remove the transport file location and only use the ldap entry
ie) zmprov ms `zmhostname` zimbraMtaTransportMaps 'proxy:ldap:/opt/zimbra/conf/ldap-transport.cf'
Re: Routing Emails from internal domain to external domain
Tried, it is still routing through internal MTA to internal domain, even with the explicit mx record url.
did not work
did not work

Who is online
Users browsing this forum: No registered users and 23 guests