Multiple Domain should route to different mail provider

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
buruguduy
Posts: 45
Joined: Sat Oct 22, 2016 1:20 pm

Multiple Domain should route to different mail provider

Postby buruguduy » Tue Sep 26, 2017 9:54 am

I have setup a test server with the following:
Virtual Host: Hyper-V Server 2016
Virtual Server: CentOS 7
Zimbra Version: Zimbra 8.7.11 OSE

Successfully created my main domain--Domain1. Routes to MailProvider1. Tested with user1@domain1.com.
Added another domain--Domain2. Should route to MailProvider2. Tested with user1@domain2.com.


In GUI => Configure => Servers => MyServer.emailserver.com => MTA, I entered server.MailProvider1.com : 587 and server.MailProvider2.com : 587 as "Relay MTA for External Delivery"
Now, after configuration, user1@domain1.com routes successfully to MailProvider1. However, user1@domain2.com sends mail, it uses MailProvider1 (it should use MailProvider2).

Blanking "Relay MTA for External Delivery," mails are deferred with "Connection timed out"

I have used the guides in https://wiki.zimbra.com/wiki/Outgoing_S ... entication and https://wiki.zimbra.com/wiki/Relay_per_Domain and a couple more upon research.

Running:

Code: Select all

$ postmap -q MailProvider1.domain1.com /opt/zimbra/conf/sasl_password
administrator@domain1.com:password1


Code: Select all

$ postmap -q MailProvider2.domain2.com /opt/zimbra/conf/sasl_password
administrator@domain2.com:password2


Both seemed correct.

BTW, I've also run the following:

Code: Select all

zmprov ms `zmhostname` zimbraMtaTransportMaps "lmdb:/opt/zimbra/common/conf/bysender,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf



Do anyone know where I did wrong?

TIA!

BTW, thanks Synacor for bringing back the Chat module

~Vhinz


buruguduy
Posts: 45
Joined: Sat Oct 22, 2016 1:20 pm

Re: Multiple Domain should route to different mail provider

Postby buruguduy » Thu Sep 28, 2017 12:23 am

Hi all,

I hope there's someone who can help out. I encountered the same problem like 2 years ago in another test server (Physical Ubuntu 14.04 + ZCS 8.5 I think) and gone through my notes...did the same as what I did and worked like a charm after..well, forgot to check if domain2 did route to MailProvider2, it just send outside email.

But my present test server, I did check that it routed to domain2.com routed to MailProvider1 instead of MailProvider2.

Help please.

Thanks!

~Vhinz
buruguduy
Posts: 45
Joined: Sat Oct 22, 2016 1:20 pm

Re: Multiple Domain should route to different mail provider

Postby buruguduy » Mon Oct 02, 2017 3:33 am

Hi,

Hope anybody would know and help me out.

Thanks!

~Vhinz
buruguduy
Posts: 45
Joined: Sat Oct 22, 2016 1:20 pm

Re: Multiple Domain should route to different mail provider

Postby buruguduy » Tue Oct 03, 2017 12:31 am

Hi Masters,

Hopefully there's anyone who knows how.

Thanks!

~Vhinz
User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 614
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12

Re: Multiple Domain should route to different mail provider

Postby ccelis5215 » Tue Oct 03, 2017 10:31 pm

buruguduy wrote:Hi Masters,

Hopefully there's anyone who knows how.

Thanks!

~Vhinz


hi Vhinz,

Just follow https://wiki.zimbra.com/wiki/Relay_per_Domain and you'll be ok.

ccelis
buruguduy
Posts: 45
Joined: Sat Oct 22, 2016 1:20 pm

Re: Multiple Domain should route to different mail provider

Postby buruguduy » Wed Oct 04, 2017 1:57 am

Hi ccelis5215 ,

Thanks for the response. I did follow that to no avail. My previous test about 2 years ago, it was fine (well, didn't check the message header that time), did the same steps now but couldn't make it to work. Below summarizes what I did:

buruguduy wrote:In GUI => Configure => Servers => MyServer.emailserver.com => MTA, I entered server.MailProvider1.com : 587 and server.MailProvider2.com : 587 as "Relay MTA for External Delivery"
Now, after configuration, user1@domain1.com routes successfully to MailProvider1. However, user1@domain2.com sends mail, it uses MailProvider1 (it should use MailProvider2).

Blanking "Relay MTA for External Delivery," mails are deferred with "Connection timed out"

I have used the guides in https://wiki.zimbra.com/wiki/Outgoing_S ... entication and https://wiki.zimbra.com/wiki/Relay_per_Domain and a couple more upon research.

Running:
Code: Select all
$ postmap -q MailProvider1.domain1.com /opt/zimbra/conf/sasl_password
administrator@domain1.com:password1


Code: Select all
$ postmap -q MailProvider2.domain2.com /opt/zimbra/conf/sasl_password
administrator@domain2.com:password2


Both seemed correct.

BTW, I've also run the following:
Code: Select all
zmprov ms `zmhostname` zimbraMtaTransportMaps "lmdb:/opt/zimbra/common/conf/bysender,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf



Do anyone know where I did wrong?
Thanks!
User avatar
scantec
Advanced member
Advanced member
Posts: 60
Joined: Mon May 05, 2014 11:55 am

Re: Multiple Domain should route to different mail provider

Postby scantec » Wed Oct 04, 2017 4:58 pm

maybe you are missing this:

zmprov ms mail.xxxx.xxx zimbraMtaSmtpSaslPasswordMaps lmdb:/opt/zimbra/common/conf/relay_password

just put in there your route
postmap /opt/zimbra/common/conf/bysender

and auth
postmap /opt/zimbra/common/conf/relay_password
buruguduy
Posts: 45
Joined: Sat Oct 22, 2016 1:20 pm

Re: Multiple Domain should route to different mail provider

Postby buruguduy » Thu Oct 05, 2017 12:46 am

Hi @santec,

Yeah, I think that is what I'm missing. Have not remembered entering a value for zimbraMtaSmtpSaslPasswordMaps. I was pretty sure I am forgetting something relating to relay_password...similar to sender_dependent_relayhost_maps.

Too early to celebrate though, have something to attend to today, but time permitting, I will be getting back on my test zimbra and hopefully it would work.

Thanks a bunch!

Will post here an update, success or not.

~Vhinz
buruguduy
Posts: 45
Joined: Sat Oct 22, 2016 1:20 pm

Re: Multiple Domain should route to different mail provider

Postby buruguduy » Fri Oct 06, 2017 8:29 am

Hello @santec,

Still no good. User1@domain2.com is still using MailProvider1 instead of MailProvider2.

BTW, I recreated from the snapshot and

Code: Select all

zmprov ms `zmhostname` zimbraMtaTransportMaps "lmdb:/opt/zimbra/common/conf/bysender,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf

is not run. Do I need it? If I understand it right, the above code routes mails addressed to specific domain.

Also, if I do run

Code: Select all

$ zmprov gs mailserver.domain1.com zimbraMtaRelayHost
zimbraMtaRelayHost: MailProvider1.domain1.com:587


If I remove MailProvider1.domain1.com:587 from the Admin GUI (Relay MTA for External Delivery), mails are not delivered and stays in queue/deferred tab with "connection timed out" error. It seems that it is trying to send directly to recipient's server.

tail of /var/log/zimbra.log:

Code: Select all

Oct  6 16:15:54 mailserver systemd-logind: New session 146 of user zimbra.
Oct  6 16:15:55 mailserver postfix/smtp[81369]: connect to alt3.gmail-smtp-in.l.google.com[173.194.219.27]:25: Connection timed out
Oct  6 16:15:57 mailserver systemd-logind: Removed session 146.
Oct  6 16:15:57 mailserver systemd-logind: Removed session 145.
Oct  6 16:15:57 mailserver postfix/smtp[81442]: connect to alt3.gmail-smtp-in.l.google.com[173.194.219.27]:25: Connection timed out
Oct  6 16:15:57 mailserver postfix/smtp[81443]: connect to mx3.hotmail.com[104.44.194.233]:25: Connection timed out
Oct  6 16:16:00 mailserver postfix/scache[79894]: statistics: start interval Oct  6 16:10:16
Oct  6 16:16:00 mailserver postfix/scache[79894]: statistics: domain lookup hits=6 miss=16 success=27%
Oct  6 16:16:00 mailserver postfix/scache[79894]: statistics: max simultaneous domains=2 addresses=2 connection=4
Oct  6 16:16:19 mailserver systemd-logind: New session 149 of user zimbra.
Oct  6 16:16:19 mailserver systemd-logind: New session 148 of user zimbra.
Oct  6 16:16:21 mailserver systemd-logind: Removed session 149.
Oct  6 16:16:21 mailserver systemd-logind: Removed session 148.
Oct  6 16:16:22 mailserver postfix/smtp[81370]: connect to mx4.hotmail.com[65.55.92.152]:25: Connection timed out
Oct  6 16:16:22 mailserver postfix/smtp[81370]: 1C3651E4000489: to=<buruguduy@outlook.ph>, relay=none, delay=152, delays=0.05/0.27/152/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.55.92.152]:25: Connection timed out)
Oct  6 16:16:25 mailserver postfix/smtp[81369]: connect to alt4.gmail-smtp-in.l.google.com[74.125.22.26]:25: Connection timed out
Oct  6 16:16:25 mailserver postfix/smtp[81369]: 1C3651E4000489: to=<vhinzisme@gmail.com>, relay=none, delay=155, delays=0.05/0.25/155/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.22.26]:25: Connection timed out)
Oct  6 16:16:27 mailserver postfix/smtp[81442]: connect to alt4.gmail-smtp-in.l.google.com[74.125.22.26]:25: Connection timed out
Oct  6 16:16:27 mailserver postfix/smtp[81443]: connect to mx3.hotmail.com[65.55.37.104]:25: Connection timed out
Oct  6 16:16:27 mailserver postfix/smtp[81442]: 4DF7D1E400048A: to=<vhinzisme@gmail.com>, relay=none, delay=150, delays=0.08/0.13/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.22.26]:25: Connection timed out)
Oct  6 16:16:28 mailserver postfix/smtp[81443]: 4DF7D1E400048A: to=<buruguduy@outlook.ph>, relay=none, delay=150, delays=0.08/0.15/150/0, dsn=4.4.1, status=deferred (connect to mx3.hotmail.com[65.55.37.104]:25: Connection timed out)
Oct  6 16:16:34 mailserver systemd-logind: New session 150 of user zimbra.
Oct  6 16:16:35 mailserver zmconfigd[75742]: Fetching All configs
Oct  6 16:16:35 mailserver zmconfigd[75742]: All configs fetched in 0.71 seconds
Oct  6 16:16:36 mailserver systemd-logind: New session 151 of user zimbra.
Oct  6 16:16:37 mailserver systemd-logind: Removed session 150.
Oct  6 16:16:38 mailserver systemd-logind: Removed session 151.
Oct  6 16:16:42 mailserver zmconfigd[75742]: Watchdog: service antivirus status is OK.
Oct  6 16:16:42 mailserver zmconfigd[75742]: All rewrite threads completed in 0.03 sec
Oct  6 16:16:42 mailserver zmconfigd[75742]: All restarts completed in 0.00 sec


Any ideas?

Thanks!
buruguduy
Posts: 45
Joined: Sat Oct 22, 2016 1:20 pm

Re: Multiple Domain should route to different mail provider

Postby buruguduy » Mon Dec 11, 2017 6:51 am

Hi community,

Just a bump-up. Luckily just a test server. I'm still unable to have domain2.com use mailprovider2.domain2.com. It is still using the mailprovider1.domain1.com (configured in GUI -- Relay MTA for External Delivery). If I decide not to put anything on it, even domain1 (along with domain2) stops external deliveries. This is even when I confugured using the previous guides at https://wiki.zimbra.com/wiki/Outgoing_S ... entication and https://wiki.zimbra.com/wiki/Relay_per_Domain and a couple more upon research.

Just to make it clearer (and perhaps a step closer), do I need the Relay MTA for External Delivery (zimbraMtaRelayHost) when I have sender_dependent_relayhost_maps set?


Thanks in advance.

Regards,


Vhinz

Return to “Administrators”

Who is online

Users browsing this forum: Bing [Bot] and 11 guests