Route local domains to external gateway

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
brtk
Posts: 14
Joined: Fri Jul 12, 2019 12:45 pm
Location: Toronto
Contact:

Route local domains to external gateway

Postby brtk » Wed Jul 31, 2019 4:50 am

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


Uma Shankar
Zimbra Employee
Zimbra Employee
Posts: 40
Joined: Wed Jun 01, 2016 5:01 am

Re: Route local domains to external gateway

Postby Uma Shankar » Wed Jul 31, 2019 6:31 am

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.
brtk
Posts: 14
Joined: Fri Jul 12, 2019 12:45 pm
Location: Toronto
Contact:

Re: Route local domains to external gateway

Postby brtk » Wed Jul 31, 2019 11:37 am

Thanks so much, I will try this today
brtk
Posts: 14
Joined: Fri Jul 12, 2019 12:45 pm
Location: Toronto
Contact:

Re: Route local domains to external gateway

Postby brtk » Wed Jul 31, 2019 12:00 pm

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
brtk
Posts: 14
Joined: Fri Jul 12, 2019 12:45 pm
Location: Toronto
Contact:

Re: Route local domains to external gateway

Postby brtk » Wed Jul 31, 2019 1:14 pm

also how would i route mail to local domains ?
localdomain :[mbxserver] # is this it ?
Uma Shankar
Zimbra Employee
Zimbra Employee
Posts: 40
Joined: Wed Jun 01, 2016 5:01 am

Re: Route local domains to external gateway

Postby Uma Shankar » Thu Aug 01, 2019 6:59 am

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]

Return to “Administrators”

Who is online

Users browsing this forum: Google [Bot] and 13 guests