Hello,
I'm using dovecot 2.3.10 in OpenSUSE and I have configured a master/master replication between two backends, it works well but I have found an issue with the replication of the HIGHESTMODSEQ. When I move a set of message from a mailbox to other, e.g. move 3 messages from INBOX to Junk, the HIGHESTMODSEQ get different on each server, with no errors in the log:
[Borrador] 34:34 [Sent] 63:63 [Drafts] 12:12 [Trash] 146:146 [Junk] 219:218 [INBOX] 1133:1130
It can be fixed executing a full sync: $ sudo doveadm -D -v sync -u user@test.priv -d -l 30 -U
But it is not a solution because it happens all the time that a user move messages.
I'm using ActiveSync and the ActiveSync server use the HIGHESTMODSEQ as part of the synchronization key (sync_key), so in that situation the server detect changes on the mailbox if it connects to the backend with a different HIGHESTMODSEQ that it previously cached, causing a loop beetween the ActiveSync server and the the email client, where the server constantly inform email client about nonexistent changes.
Could it be a bug in Dovecot replication? How can I solve it?
Best regards, Gustavo Ajeitos
Hello again,
Any help with this will be very appreciated.
Thank you in advance. Gustavo Ajeitos
El 9/10/20 a las 16:17, Gustavo Ajeitos escribió:
Hello,
I'm using dovecot 2.3.10 in OpenSUSE and I have configured a master/master replication between two backends, it works well but I have found an issue with the replication of the HIGHESTMODSEQ. When I move a set of message from a mailbox to other, e.g. move 3 messages from INBOX to Junk, the HIGHESTMODSEQ get different on each server, with no errors in the log:
[Borrador] 34:34 [Sent] 63:63 [Drafts] 12:12 [Trash] 146:146 [Junk] 219:218 [INBOX] 1133:1130
It can be fixed executing a full sync: $ sudo doveadm -D -v sync -u user@test.priv -d -l 30 -U
But it is not a solution because it happens all the time that a user move messages.
I'm using ActiveSync and the ActiveSync server use the HIGHESTMODSEQ as part of the synchronization key (sync_key), so in that situation the server detect changes on the mailbox if it connects to the backend with a different HIGHESTMODSEQ that it previously cached, causing a loop beetween the ActiveSync server and the the email client, where the server constantly inform email client about nonexistent changes.
Could it be a bug in Dovecot replication? How can I solve it?
Best regards, Gustavo Ajeitos
On 09/10/2020 21:17, Gustavo Ajeitos [Office365] wrote:
Hello,
I'm using dovecot 2.3.10 in OpenSUSE and I have configured a master/master replication between two backends, it works well but I have found an issue with the replication of the HIGHESTMODSEQ. When I move a set of message from a mailbox to other, e.g. move 3 messages from INBOX to Junk, the HIGHESTMODSEQ get different on each server, with no errors in the log:
[Borrador] 34:34 [Sent] 63:63 [Drafts] 12:12 [Trash] 146:146 [Junk] 219:218 [INBOX] 1133:1130
It can be fixed executing a full sync: $ sudo doveadm -D -v sync -u user@test.priv -d -l 30 -U
But it is not a solution because it happens all the time that a user move messages.
I'm using ActiveSync and the ActiveSync server use the HIGHESTMODSEQ as part of the synchronization key (sync_key), so in that situation the server detect changes on the mailbox if it connects to the backend with a different HIGHESTMODSEQ that it previously cached, causing a loop beetween the ActiveSync server and the the email client, where the server constantly inform email client about nonexistent changes.
Could it be a bug in Dovecot replication? How can I solve it?
Best regards, Gustavo Ajeitos
Hi Gustavo
I don't know if this is a bug, but one thing I noticed is that for master/master replication the recommendation is to have specific users always directed to the same server. If you implemented this recommendation for the ActiveSync connections, would that solve the problem?
John
Hi John,
Thank you for your answer!
I agree with you, I think you recommendation should solve the problem, it seems the only possible workaround. I have to investigate if it possible and how to accomplish that with the load balancer.
Gustavo
El 3/11/20 a las 15:27, John Fawcett escribió:
On 09/10/2020 21:17, Gustavo Ajeitos [Office365] wrote:
Hello,
I'm using dovecot 2.3.10 in OpenSUSE and I have configured a master/master replication between two backends, it works well but I have found an issue with the replication of the HIGHESTMODSEQ. When I move a set of message from a mailbox to other, e.g. move 3 messages from INBOX to Junk, the HIGHESTMODSEQ get different on each server, with no errors in the log:
[Borrador] 34:34 [Sent] 63:63 [Drafts] 12:12 [Trash] 146:146 [Junk] 219:218 [INBOX] 1133:1130
It can be fixed executing a full sync: $ sudo doveadm -D -v sync -u user@test.priv -d -l 30 -U
But it is not a solution because it happens all the time that a user move messages.
I'm using ActiveSync and the ActiveSync server use the HIGHESTMODSEQ as part of the synchronization key (sync_key), so in that situation the server detect changes on the mailbox if it connects to the backend with a different HIGHESTMODSEQ that it previously cached, causing a loop beetween the ActiveSync server and the the email client, where the server constantly inform email client about nonexistent changes.
Could it be a bug in Dovecot replication? How can I solve it?
Best regards, Gustavo Ajeitos
Hi Gustavo
I don't know if this is a bug, but one thing I noticed is that for master/master replication the recommendation is to have specific users always directed to the same server. If you implemented this recommendation for the ActiveSync connections, would that solve the problem?
John
On 04/11/2020 18:33, Gustavo Ajeitos [Office365] wrote:
Hi John,
Thank you for your answer!
I agree with you, I think you recommendation should solve the problem, it seems the only possible workaround. I have to investigate if it possible and how to accomplish that with the load balancer.
Gustavo
Gustavo
client ip address affinity is probably the easiest way - if supported on your load balancer - and providing that your users are distributed on different ip addresses (e.g. not behind a NAT and presenting all as the same ip).
John
Hi John,
I will go on that direction, thank you for the advice.
BR Gustavo
El 4/11/20 a las 15:33, John Fawcett escribió:
On 04/11/2020 18:33, Gustavo Ajeitos [Office365] wrote:
Hi John,
Thank you for your answer!
I agree with you, I think you recommendation should solve the problem, it seems the only possible workaround. I have to investigate if it possible and how to accomplish that with the load balancer.
Gustavo Gustavo
client ip address affinity is probably the easiest way - if supported on your load balancer - and providing that your users are distributed on different ip addresses (e.g. not behind a NAT and presenting all as the same ip).
John
On 6. Nov 2020, at 14.12, Gustavo Ajeitos <ajeitos@hornetsecurity.com> wrote: El 4/11/20 a las 15:33, John Fawcett escribió:
On 04/11/2020 18:33, Gustavo Ajeitos [Office365] wrote:
Hi John,
Thank you for your answer!
I agree with you, I think you recommendation should solve the problem, it seems the only possible workaround. I have to investigate if it possible and how to accomplish that with the load balancer.
Gustavo Gustavo
client ip address affinity is probably the easiest way - if supported on your load balancer - and providing that your users are distributed on different ip addresses (e.g. not behind a NAT and presenting all as the same ip).
Best solution is to put dovecot director ring in front of the backends to balance the load.
Sami
Hi Sami,
Really interesting, I'm new to Dovecot and I didn't know about this feature of the directors, I definitely will look at that.
Thank for your hint! BR Gustavo
El 6/11/20 a las 09:27, Sami Ketola escribió:
On 6. Nov 2020, at 14.12, Gustavo Ajeitos <ajeitos@hornetsecurity.com> wrote: El 4/11/20 a las 15:33, John Fawcett escribió:
On 04/11/2020 18:33, Gustavo Ajeitos [Office365] wrote:
Hi John,
Thank you for your answer!
I agree with you, I think you recommendation should solve the problem, it seems the only possible workaround. I have to investigate if it possible and how to accomplish that with the load balancer.
Gustavo Gustavo
client ip address affinity is probably the easiest way - if supported on your load balancer - and providing that your users are distributed on different ip addresses (e.g. not behind a NAT and presenting all as the same ip). Best solution is to put dovecot director ring in front of the backends to balance the load.
Sami
participants (4)
-
Gustavo Ajeitos
-
Gustavo Ajeitos [Office365]
-
John Fawcett
-
Sami Ketola