Hi,
Confirming this issue also arises when coming from 3.2.6-2+deb11u2.
After conducting an update from a fully updated Bullseye to Bookworm, no
more mails were in any user's account, and new mailboxes were created
for users when logging in.
All accounts are many years old. As I had awareness of potential upgrade
issues, I even tried to run reconstruct -G -V max before conducting the
upgrade, which though did not help to prevent the desaster.
Suggestion:
Bullseye (oldstable) should be updated to a Cyrus version 3.2.10+, as
this is the only confirmed way as per Cyrus' upgrade documentation to
avoid these issues when moving to v3.6.1 as contained in Bookworm.
https://www.cyrusimap.org/3.6/imap/download/upgrade.html#versions-to-upgrade-from
I currently have no awareness of what else an admin could do to prevent
this from happening when updating directly from 3.2.6-2+deb11u2
(Standard Bullseye). The most promising hints I've read in other threads
is to run the reconstruct with additional parameters (reconstruct -f -G
-I -V max), whereas I would suggest anyone not to test this without a
very solid backup.
For others for whom it's too late and who are here for solutions, here
is what I did to recover after the desaster:
1) su'ed to user cyrus
2) Downloaded rescue script by @larsimmisch from here and saved to local
folder:
https://gist.github.com/larsimmisch/f0c02977ffc9a9c72781716eaa3d7334
3) In the same folder:
git clone https://github.com/larsimmisch/python_cyrus python_cyrus
4) python3 ./cyrreconstruct.py -a <cyrus admin user> <mailbox username>
Step 4 will only work if the mailbox has already been created again
(what happens automatically - as an empty one - when a user logs in). If
the mailbox isn't present yet, use cyradm and
cm user.<username>
to create it before running the cyrreconstruct.py script.
Special thanks to @larsimmisch for saving my life, and to the package
maintainers for acting swiftly for preventing others from this nightmare.
Best,
Bastian