cyrusimap / cyrus-imapd

Cyrus IMAP is an email, contacts and calendar server
http://cyrusimap.org
Other
534 stars 146 forks source link

fatal error: mupdate said not us before it said us #4946

Open jcdelepine opened 3 months ago

jcdelepine commented 3 months ago

cyrus 3.8.3 backends can't sync mailboxes with cyrus 3.2.12 mupdate.

The first occurence of "ctl_mboxlist -m" goes well but each subsequent one gives the error :

mupdate said: DELETED.user.xxxxxx.Trash.2023-09_INT_Bornes Wifi Bat G.65B7B6BC cyrus-backend-pers-2-18!default xxxxxx lrswipkxtecdan anyone p
mailboxes.db said: DELETED.user.xxxxxx.Trash.2023.65E33B49 cyrus-backend-pers-2-18!default xxxxxx lrswipkxtecdan anyone p
mupdate says: DELETED.user.xxxxxx.Trash.2023.65E33B49 cyrus-backend-pers-2-18!default xxxxxx lrswipkxtecdan anyone p
fatal error: mupdate said not us before it said us

ctl_mboxlist -ma always works fine.

Backend tested with Debian's 3.8.1-1~bpo12+1 backport to bookworm, self 3.8.3 backport to bookworm (based on sid one's) Mupdate tested with Debian's 3.2.6-2+deb11u2 bullseye package, self 3.2.12 package based on bullseye's one's.

The problem doesn't occurs with Debian's 3.6.1-2~bpo11+2 backport to bullseye.

My cluster has many 3.2 backends replicated to 3.8 one's. The documentation says I should switch to the replicated backends before upgrading mupdate and frontends (documentaton doesn't says if I should do frontends before mupdate or not).

Should I bypass the documentation and upgrade mupdate first ? At least to cyrus 3.6 ?

How can I help you find the problem between 3.8 backends and 3.2 mupdates ?

Sincerly, Jean Charles Delépine

ksmurchison commented 2 months ago

What is the value of the "improved_mboxlist_sort" option on the 3.2 mupdates? This looks to me that 3.2 is sorting '-' before '.' (ASCII order), but 3.6+ expects the opposite (the hierarchy separator sorts before other characters).

jcdelepine commented 2 months ago

Quoting Ken Murchison @.***>:

What is the value of the "improved_mboxlist_sort" option on the 3.2
mupdates? This looks to me that 3.2 is sorting '-' before '.'
(ASCII order), but 3.8+ expects the opposite (the hierarchy
separator sorts before other characters).

That should explain why -

improved_mboxlist_sort is false on both 3.2 and 3.8. I will give a try
with improved_mboxlist_sort=true on my test mupdate server.

Thanks ! -- Service systèmes et réseaux - DISI

Université de Picardie Jules Verne 5, rue du moulin neuf - 80000 Amiens

ksmurchison commented 2 months ago

Please read imapd.conf(5) about changing improved_mboxlist_sort. You can't change it on a running system.

jcdelepine commented 2 months ago

Quoting Ken Murchison @.***>:

Please read imapd.conf(5) about changing improved_mboxlist_sort.
You can't change it on a running system.

I did. I will test it on an empty mupdate server. With -C.

Sincerly. Jean Charles Delépine -- Service systèmes et réseaux - DISI

Université de Picardie Jules Verne 5, rue du moulin neuf - 80000 Amiens

jcdelepine commented 2 months ago

Quoting Ken Murchison @.***>:

Please read imapd.conf(5) about changing improved_mboxlist_sort.
You can't change it on a running system.

I did. I will test it on an empty mupdate server. With -C.

Sincerly. Jean Charles Delépine

-- Service systèmes et réseaux - DISI

Université de Picardie Jules Verne 5, rue du moulin neuf - 80000 Amiens

jcdelepine commented 2 months ago

That's it. a.b is now listed before a-b on my 3.2 test mupdate as on the 3.8 backend and the 3.8 can synchronise with mupdate.

But, as expected, now the 3.2 backend refuses to synchronise with the test mupdate :

mupdate said: user.test.a.b cyrus-backend-dev-01!default test   lrswipkxtecdan  
mailboxes.db said: user.test.a-b cyrus-backend-dev-01!default test  lrswipkxtecdan  
mupdate says: user.test.a-b cyrus-backend-dev-01!default test   lrswipkxtecdan  
fatal error: mupdate said not us before it said us

I will have to convert not only the mupdate server but also my 25 remaining 3.2 backends.

Thanks, that was of great help.