Replication between three servers

James Pharaoh james at pharaoh.uk
Thu Jan 19 09:13:04 UTC 2017


Hi,

Dovecot version: 2.2.27

I'm a little unsure if I have set up my replication correctly, and also 
how to set up replication on three servers, if this is possible.

My replication works, with exactly the same configuration on both 
servers, except that the mail_replica contains the other server name in 
each case, of course. This seems to work fine.

As I understand it, both need to be set up as a client and a server, 
since I have mail arriving on both. Is this a correct and supported 
configuration?

I believe then I should be able to get three-way replication working, by 
pointing the three servers at each other in a circle. I am hoping this 
will cause a mail arriving at server 1 to be sent to server 2, which 
will then send it to server 3. Server 3 will attempt to send it back to 
server 1 which will already have it, and so this will terminate the loop.

This is obviously going to create a bit of extra load, but I don't want 
to try it without some advice, and I'm not sure if the replication will 
be triggered properly by an email which is itself arriving via 
replication. Reading the description of the components, I think it 
should, since the aggregator service shouldn't care how an email has 
arrived, since it is simply reading the log, right?

If a server fails, or needs to be taken out manually, I'll obviously 
need to reconfigure the loop, essentially taking it back to a standard 
two-server configuration. Similarly, I should be able to add a fourth 
server, and so on, if I wanted.

I'm planning to distribute incoming emails over all servers, so that 
these will arrive and be stored on a working server during an outage 
without any reconfiguration, and to use something like nginx as a proxy 
to send each user to a specific server, to distribute the client load.

Thanks in advance,
James


More information about the dovecot mailing list