Am 24.09.2014 um 15:06 schrieb Nikolaos Milas: > Hello, > > In the past I have discussed some failover options for incoming mail. > > Now, I would appreciate your advice on outgoing mail (and POP3/IMAP > mailbox access) in building a mail service with redundancy. > > We already have two production mail servers, vmail1 and vmail2, running > postfix/dovecot (with virtual users on LDAP), each running on a separate > data center. > > vmail1 is the main one (i.e. the one used to send mail and host users' > mailboxes), vmail2 is only used as a backup. > > Mailboxes are using Maildir format and are being synced (in near > real-time) using dovecot dsync service. > > IMPORTANT: Each of the two servers has its own distinct server name and > its own separate certificate. This allows proper operation of IMAP syncing. > > Our goal is to allow our users to always use one address, say > *vmail.example.com*, to automatically access SMTP/POP3/IMAP services at > vmail1 and, only if vmail1 is down, at vmail2. > > DNS could offer a solution: creating, for example, a CNAME > "vmail.example.com" pointing to vmail1 would probably solve the problem > by using a very low DNS record refresh time and use a script to monitor > vmail1 availability; if vmail1 is down, the script could update the > CNAME to point to vmail2 instead (and force a zone refresh). This could > leave a small downtime window (depending on the refresh time configured). > > Yet, I am thinking that it may be more advantageous to use another two > *identical* VMs (one on each data center, for redundancy) running NGINX, > with the common name (and a common certificate for) vmail.example.com > (in DNS: an A record with two IP Addresses). Both proxies would > automatically redirect (via NGINX) all SMTP/POP3/IMAP requests to vmail1 > and, only if vmail1 is down, to vmail2, while the user will always > see/configure vmail.example.com as their mail server. > > Is this a feasible/suggested scenario? Any hints, experiences, > configuration advice, pitfalls, alternative approaches etc. would be > greatly appreciated. > > Please advise. > > Thanks in advance, > Nick >
some easy way use loadbalancers,i.e. keepalived could do it perhaps like this https://sys4.de/de/blog/2013/06/10/loadbalancing-mit-keepalived-postfix-dovecot/ sorry german but setup should speak for its own Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein