I would like to set up an active-active fault tolerance couple of mail servers.
Is the following procedure correct?
Let's suppose I want to set up two servers for acme.com, mail1.acme.com and mail2.acme.com
I declare both servers as MX in DNS configuration.
Mailbox are stored in maildir with a single UID/GID owner for all the maildir files
Userbase is MySQL, user tables are replicated using MySQL tools; in this case, the replica is one way, that is mail1.acme.com holds the "master" copy of MySQL tables and mail2.acme.com hold the "copy".
The replica is done via dsync with a procedure like this executed on mail1.acme.com server:
foreach mailbox { dsync mirror mailbox }
Where mailbox is the full mail address, used also as a login name for authentication.
My goal is to allow users to connect the mail servers they like and have all their mail (a 10/15 minute of sync delay is acceptable).
This is the theory, now some questions.
Use Linux user/group owner of the files and directories are the same on both hosts (they are both foobar), but have different numeric ID, in one host foobat has UID 1234 and on the other host foobar has UID 2345. Is this an issue?
Mail location path is the same on both hosts, but where does dsync get it? Does dsync get all the information from the userbase defined in dovecot.conf (and other included files)?
Have I to scan the entire userbase and execute dsync for each user, or is there a trick to do for every user with a single command?
How often is good to run the synchronization? 5 minutes? 10? 15?
What is the correct command line to invoke dsync in this scenario?
Does anyone else tried this? :)
Thank you.
Ciao, luigi
-- / +--[Luigi Rosa]-- \
(1) Everything depends. (2) Nothing is always. (3) Everything is sometimes.