Page 1 of 1

Unable to connect to the MTA

Posted: Sat Nov 03, 2018 7:57 pm
by Rama
Hi All,
We have a Zimbra-8.8.8 multi server setup done.
prdmta1.prod.colo & prdmta2.prod.colo are configured round-robin hostname zimbra.prod.colo that serve ldap MMR + MTA active/active + Proxy + memcache. Where prdzmb.prod.colo serves as mailbox server.

The setup is fine for now. In mailbox server we set zimbraSmtpHostname as zimbra.prod.colo(round-robin name). The problem is mailbox server always using first MTA hostname when relaying messages. If that host down for any reason, mailbox server is unable to relay messages and giving error try again: Unable to connect to the MTA for sometime. If we keep retrying sending mails, then mailbox server connects next available MTA.

Can anyone please help us. Does Zimbra recommends round-robin smtp or active & failover smtp. :idea:

Re: Unable to connect to the MTA

Posted: Sat Nov 03, 2018 9:55 pm
by tonster
Rama wrote:Hi All,
We have a Zimbra-8.8.8 multi server setup done.
prdmta1.prod.colo & prdmta2.prod.colo are configured round-robin hostname zimbra.prod.colo that serve ldap MMR + MTA active/active + Proxy + memcache. Where prdzmb.prod.colo serves as mailbox server.

The setup is fine for now. In mailbox server we set zimbraSmtpHostname as zimbra.prod.colo(round-robin name). The problem is mailbox server always using first MTA hostname when relaying messages. If that host down for any reason, mailbox server is unable to relay messages and giving error try again: Unable to connect to the MTA for sometime. If we keep retrying sending mails, then mailbox server connects next available MTA.

Can anyone please help us. Does Zimbra recommends round-robin smtp or active & failover smtp. :idea:


Unfortunately, java is going to lookup that hostname and cache it, so you're never going to get a failover in that scenario (unless it expires from the cache, does a new lookup, and gets the other IP). Regardless, you'll end up in the same situation. What you want to do instead is have multiple zimbraSmtpHostname's assigned so that it will failover to the next one in the list. It'll give you the round-robin you want. The only other thing you could do here is use a proxy or load balancer that will allow you to use a single hostname and do the round-robin for you.

Re: Unable to connect to the MTA

Posted: Sat Nov 03, 2018 10:18 pm
by vavai
Hi Rama,

I would prefer to use HAProxy (or any load balancer) with least-connection instead of round-robin. You can define all mta server on haporoxy and it wil serve as mta for your Zimbra instance. HAproxy is quite clever to binding to an active MTA server only, thus preventing inactive mta server being used by Zimbra as your above scenario.

Re: Unable to connect to the MTA

Posted: Sun Nov 04, 2018 5:58 am
by Rama
Hi Tonster/Vavai,

Thanks all. The SMTP hostname, zimbra.prod.colo is configured as round-robin that is already behind zimbra haproxy component. Can you please suggest is any feasible option to set less cache time in Java level, if I am not wrong.

Re: Unable to connect to the MTA

Posted: Sun Nov 04, 2018 1:56 pm
by vavai
Hi
Rama wrote:Hi Tonster/Vavai,

Thanks all. The SMTP hostname, zimbra.prod.colo is configured as round-robin that is already behind zimbra haproxy component. Can you please suggest is any feasible option to set less cache time in Java level, if I am not wrong.


As far as I know, Zimbra proxy using Nginx, not Haproxy. I'm currently using more than 10 MTA server behind HAproxy to provide load balancer with least-conn and have no problem so far. Haproxy itself can be installed on Zimbra server without any interference as long as setting up different port than what was provided by Zimbra. Its port can be used by mailbox server.

I'm sorry, I could not help for less cache time on Java level.

Re: Unable to connect to the MTA

Posted: Sun Nov 04, 2018 5:07 pm
by tonster
Rama wrote:Hi Tonster/Vavai,

Thanks all. The SMTP hostname, zimbra.prod.colo is configured as round-robin that is already behind zimbra haproxy component. Can you please suggest is any feasible option to set less cache time in Java level, if I am not wrong.


zimbra uses nginx, not haproxy, and there is no proxying available of the mta stack. There is no option available to java to do what you want here. You'll have to use an option that I specified previously to accomplish this.

Re: Unable to connect to the MTA

Posted: Mon Nov 05, 2018 12:11 pm
by Rama
Hi Tonster/Vavai,

Thanks Again. I will explore both HAproxy and failback options and tune it accordingly.