Route local domains to external gateway
Route local domains to external gateway
I am straggling to get this going. I have multi server deployment with 4 local domains. I have server MTA and configured relay to external gateway. Requirement is that all domains even local get routed to external gateway first. All mail is routed to external gateway and only local domain route locally and I cant get them to go out. I tried using MX records pointing MX for local domain to gateway but that did not work. i tried using routemaps but could not that to work also. What is the best way to achieve this ? Thanks in advance for all responses
-
- Posts: 40
- Joined: Wed Jun 01, 2016 5:01 am
Re: Route local domains to external gateway
Hi,
You can use zimbraTransportMaps to achieve this
su - zimbra
vi /opt/zimbra/common/conf/transportfile
domain1.com :[relay.example.com]
domain2.com :[relay.example.com]
user1@domain3.com :[relay.example.com]
postmap /opt/zimbra/common/conf/transportfile
zmprov ms mail.example.com zimbraMtaTransportMaps "lmdb:/opt/zimbra/common/conf/transportfile"
This will help you achieve the requirement for local domains as well. Do remember to mention the local domains in the transportfile.
You can use zimbraTransportMaps to achieve this
su - zimbra
vi /opt/zimbra/common/conf/transportfile
domain1.com :[relay.example.com]
domain2.com :[relay.example.com]
user1@domain3.com :[relay.example.com]
postmap /opt/zimbra/common/conf/transportfile
zmprov ms mail.example.com zimbraMtaTransportMaps "lmdb:/opt/zimbra/common/conf/transportfile"
This will help you achieve the requirement for local domains as well. Do remember to mention the local domains in the transportfile.
Re: Route local domains to external gateway
Thanks so much, I will try this today
Re: Route local domains to external gateway
Uma Shankar wrote:Hi,
You can use zimbraTransportMaps to achieve this
su - zimbra
vi /opt/zimbra/common/conf/transportfile
domain1.com :[relay.example.com]
domain2.com :[relay.example.com]
user1@domain3.com :[relay.example.com]
postmap /opt/zimbra/common/conf/transportfile
zmprov ms mail.example.com zimbraMtaTransportMaps "lmdb:/opt/zimbra/common/conf/transportfile"
This will help you achieve the requirement for local domains as well. Do remember to mention the local domains in the transportfile.
Forgot to ask , will this work for version 8.8 ? Thanks
Re: Route local domains to external gateway
also how would i route mail to local domains ?
localdomain :[mbxserver] # is this it ?
localdomain :[mbxserver] # is this it ?
-
- Posts: 40
- Joined: Wed Jun 01, 2016 5:01 am
Re: Route local domains to external gateway
Hi,
Yes, this will work with ZCS 8.8.*
Also, for local domains you need to make an entry in the transport file as
localdomain : [externalgateway]
Yes, this will work with ZCS 8.8.*
Also, for local domains you need to make an entry in the transport file as
localdomain : [externalgateway]