Home Forums OS X Server and Client Discussion Mail 10.4.2 corrupt cyrus DB Fix

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #363356
    blake
    Participant

    So this weekend I was removing a bad secondary disk from my mail server and ended up doing a hard reset at one point. My system came back pegged and the console.log was full of the messages.

    imap [20000]:DBERROR: critical database situation
    

    After some swearing about Cyrus I remembered that apple included those fancy repair buttons in the server admin now. Under the maintenance tab it showed the mail store as 0.0 B in size. So I clicked the cool repair button and the mail store returned to its normal ~300MB in size. However nothing showed up in the accounts tab.

    It’s hard to reconstruct a mailstore if you can’t select it in the UI.
    I went around searching for some manual instructions that where updated for 10.4.2 of which I didn’t find any. Apple has been changing a lot of mail bits with the 10.4.X releases.

    Anyway I will cut to the chase. On the apple forum some dude posted a link to a nice script that solved my DB issues. This tool also does some backup and other neat tricks

    It’s called mailbfr and you can download it from here.
    http://osx.topicdesk.com/downloads/

    The only issue I saw was some old messages showing up as being sent today. However these messages where around for other previous nights of mailboxes.db resurrections and may have been borked at that point..

    Blake-

    #363484
    Anonymous
    Guest

    Shutdown your mail server : serveradmin stop mail (as root)
    restart the server ( to be sure to unlock all databases)

    Save your mboxlist (using /usr/bin/cyrus/bin/ctl_mboxlist -d > mboxlist.dump)

    rm -rf “/var/imap/*”
    recreate your imap database : (sudo -u cyrusimap /usr/bin/cyrus/tools/mkimap)

    start and stop the server : serveradmin start mail & serveradmin stop mail

    import your mboxlist using “sudo -u cyrusimap /usr/bin/cyrus/bin/ctl_mboxlist -u < mboxlist.dump" reconstruct all mailboxes : sudo -u cyrusimap /usr/bin/cyrus/bin/reconstruct -r user/*” Good luke

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed