Uncategorized

Cyrus' Reconstruct

If you need to rebuild a user’s mailbox in Mac OS X Server, you will need to use the reconstruct command to do so while authenticated as the cyrusimap user. To do so, we will use the sudo command followed by a -u (for user) and then the cyrusimap username. Next, we will supply the path to the reconstruct command and then use the -r and -f options (recursively and filesystem checks respectively):

sudo -u cyrusimap /usr/bin/cyrus/bin/reconstruct -r -f user/cedge

Occasionally, you will also want to use -x as a mailbox may not be in the list and therefore may need to have the metadata rebuilt (mostly common when importing mailboxes from an old server and resolving corruption:

sudo -u cyrusimap /usr/bin/cyrus/bin/reconstruct -r -f -x user/cedge

Other operators include -p (mailbox is on another partition) and -c (allows you to read settings from a different config file).