Many people are having sudden problems with Cyrus in 10.3.8, 10.3.9, and 10.4. A corruption of mailboxes.db leaves users unable to access any emails at all.
Read on for how to work around this. Following Apple’s steps leaves email that is in the mail spools, appears in SquirrelMail, yet refuses to appear in Mail.app, and throws an error in Entourage.
Fear not! This thread at the Apple discussion board detailes exactly what the problem is, and one fellow named James Goodlet even posted a utility to fix your emails.
It turns out that Apple changed a function in reconstruct that sets an internal timestamp. This timestamp is supposed to be the time the email arrived. However, Apple’s change makes the function set the timestamp to 0, a state that email clients cannot handle.
Here is how to fix it:
1) Follow Apple TIL Article 107996 by executing these commands in the Terminal.
su root
mv /var/imap /var/imap.old
mkdir /var/imap
/usr/bin/cyrus/tools/mkimap
chown -R cyrus:mail /var/imap
sudo -u cyrus /usr/bin/cyrus/bin/reconstruct -i
This will result in a fresh mailboxes.db for you to fix.
2) Fix the internal timestamps of the mail store:
curl -o http://www.sussex.ac.uk/~jamesg/reconstruct.zip
open reconstruct.zip
sudo mv reconstruct_for_10_3_9_only /usr/bin/cyrus/bin
sudo chmod ugo+x /usr/bin/cyrus/reconstruct_for_10_3_9_only
sudo -u cyrus /usr/bin/cyrus/bin/reconstruct_for_10_3_9_only -r -f user
These reconstruct commands will take quite a while as they parse through every email in your mailstore. While you wait, be sure to post a quick thank you to James.