Dovecot Director: Preferred backend server

dovecot at ptld.com dovecot at ptld.com
Mon Aug 30 19:56:09 EEST 2021


> I have a dovecot cluster with directror and two IMAP Servers behind.
> 
> Since they are in geographical different locations I would like to
> have users to go to a specific IMAP backend server (if both are up)
> and only switch to the other if one goes down (failover).
> 
> As to my current knowledge the PassDB extra field „host=„ is not
> suitable in this case as it would never route the client to a
> different backend, even if the „user specific backend“ would be down.
> 
> Is their a way in dovecot to achive this? As far as I searched the
> documentation I could not find any information on this so far.
> 
> If not, it may also help if I could get certain users to „initially"
> go to a specific backend (since director usually routes a client/user
> to the same backend server it initially connects) and therefore it
> would be interesting to know how dovecot director chooses wether a
> user goes to server1 or server2?
> And if a client already gets to server2, how to bring it „back“ to 
> server1?


Have you looked into HAProxy? Don't know if it the answer you seek but 
it allows for sticky connections and does keep alive checking to stop 
routing to a non-responsive server.
https://www.haproxy.org/


More information about the dovecot mailing list