We recently had an I/O failure with our XRaid that appears to have
corrupted one of our user's Cyrus mailboxes. This is causing
various mail clients (Mail.app, Horde/IMP, Prayer) to behave oddly
when pulling the IMAP headers. Looking in his mail folder,
cyrus.header is missing completely. I restored this from backup
and ran reconstruct as the cyrus user, but it has no effect.
I've managed to determine which mail file is missing (3529.), but
I'm nto sure how to proceed. Nothing I've tried seems to clean up
the Cyrus files (cyrus.*) and make them see that this email doesn't
exist. Any ideas?
What I tend to do in this situation is to:
* create a new mailbox for that user (either using a mail client or
cyradm)
* copy all the mail files into it using cp [0-9]* from the problem
mailbox.
* make sure the new mailbox and all the contents are owned by cyrus:mail
* use sudo -u cyrus /usr/bin/cyrus/bin/reconstruct user/username/
newmailboxname to reconstruct it.
Then if that seems to resolve it, trash the problem mailbox using
cyradm or a mail client.
This seems to work a lot better than trying to fix an existing
mailbox and means you've always got a backup of the original mail in
case something goes wrong.
I've found that Thunderbird is much more forgiving of mailbox errors
than Mail.app, so it can be quite useful to use in situations like this.
--
Nigel Kersten [Senior Technical Officer]
College of Fine Arts, University of NSW, Australia.
CRICOS Provider Code: 00098G