[Dovecot] mbox sync: Expunged message reappeared in mailbox

Timo Sirainen tss at iki.fi
Sat Nov 4 11:15:21 UTC 2006


On Fri, 2006-11-03 at 12:55 -0600, Jim Garrison wrote:
> I just saw this message also:
> 
> > dovecot: Nov 03 10:35:59 Error: POP3(joyce at jhmg.net): mbox sync:
> > UID inserted in the middle of mailbox
> > /var/mail/vhosts/jhmg.net/joyce (1603 > 1595, seq=2, idx_msgs=9)
> Does (1603 > 1595) refer to line numbers in the file?

They refer to messages' UIDs. The above message means that the second
mail in the mbox file contained "X-UID: 1595" header, while the mbox had
already contained UIDs up to 1603.

This by itself isn't enough to give the error though. If Dovecot sees
broken X-UID headers for "new" messages, they're silently fixed. So
besides having a broken X-UID header, Dovecot had to think this was a
message it had already seen. In the above message it says Dovecot last
saw 9 messages in the mbox file, and it's now parsing only the second
one. So it means that something expunged the messages outside Dovecot.

So.. If the mboxes are changed only using Dovecot, this really shouldn't
be happening. Typically it could only happen when eg. copying an older
backup of the mbox file over the new changed one.

> Jim Garrison wrote:
> > Starting at 05:32 this morning, one user on my dovecot server is
> > receiving hundreds of copies of old email.  This is a short excerpt
> > from my dovecot.log showing the problem:

You should anyway filter out the X-UID headers (and preferrably other
Dovecot's metadata headers) in your MTA/LDA so that they won't get
written to the mbox. That might help here if mbox is modified externally
also.

Anyway, these error messages shouldn't show up to users in any way. They
get automatically fixed and won't give the client any error messages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20061104/98cdf7ff/attachment.pgp 


More information about the dovecot mailing list