For When You Can't Have The Real Thing
[ start | index | login ]
start > cyrus > imap > Mailbox has an invalid format

Mailbox has an invalid format

Created by dave. Last edited by dave, 18 years and 328 days ago. Viewed 11,546 times. #4
[diff] [history] [edit] [rdf]

Delivery error: "stat=Deferred: 451 4.2.0 Mailbox has an invalid format"

After a particularly violent power outage (a suprise shutdown), we started getting error messages on our imap server like this:

Apr  5 21:26:52 jupiter sm-mta[778]: j360A1Yf025619: to=<>, delay=01:16:51, xdelay=00:00:00, mailer=cyrusv2, pri=1801833, relay=localhost [[UNIX: /opt/cyrus/imap/socket/lmtp]], dsn=4.2.0, stat=Deferred: 451 4.2.0 Mailbox has an invalid format

Undelivered mail goes and lurks in the queue, where attempts to deliver it happen occasionally. Presumably it will eventually time out and bounce.

In our case, the problem turned out to be corrupted quota files (not mailbox files). The solution:

  • find the quota files -- in a virtual domain setup, use something like
    # find ~cyrus -type f | grep quota
  • remove the quota files for the affected mailbox(es)
  • run
    # reconstruct -r -f user/
  • reapply any required quotas
Now you can force sendmail to flush the queue, and the messages should get delivered.

Note that if sendmail tries to deliver a message after the quota file is deleted but before the reconstruct runs, you get an I/O error instead, and the message gets returned to the queue.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt