Hi All 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? thanks in advance, Steven -- https://steven.varco.ch/ https://www.tech-island.com/
> 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/
Haven?t looked at this use case, so I?m unsure if there?s existing functionality to achieve this. If not: you could set the default vhost count of the failover server to 0, and up it once some health check sets the primary server to down. Sent from mobile> Op 30 aug. 2021 om 18:11 heeft Steven Varco <dovecot.org at bbs.varco.ch> het volgende geschreven: > > ?Hi All > > 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? > > thanks in advance, > Steven > > -- > https://steven.varco.ch/ > https://www.tech-island.com/ > >
> Op 30 aug. 2021 om 18:11 heeft Steven Varco <dovecot.org at bbs.varco.ch> het volgende geschreven: > > ?Hi All > > 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?This is documented.> > thanks in advance, > Steven > > -- > https://steven.varco.ch/ > https://www.tech-island.com/ > >
> On 30/08/2021 19:09 Steven Varco <dovecot.org at bbs.varco.ch> wrote: > > > Hi All > > 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? > > thanks in advance, > Steven > > -- > https://steven.varco.ch/ > https://www.tech-island.com/Hi! Use dovecot director tag feature. You can match users with tag= to a specific backend at tag. Aki