[Dovecot] UID inserted in the middle of mailbox errors

Dean Brooks dean at iglou.com
Mon Mar 31 18:32:13 EEST 2008


On Fri, Mar 28, 2008 at 10:53:49AM -0400, Dean Brooks wrote:

> We are still getting, on a daily basis, users who cannot move messages
> to Trash or expunge Trash due to these errors:
> 
>    Mar 28 10:43:57 tm2 dovecot: [ID 107833 mail.error] IMAP(kss021):
>    mbox sync: UID inserted in the middle of mailbox
>    /home/kss021/Mail/Trash (3137 > 536, seq=2, idx_msgs=76)
> 
> Our users have no other access to their mailbox other than Dovecot,
> and we are using mbox format and 1.1rc3.
> 
> Deleting the indexes fixes the problem, so it seems to be a problem
> with index corruption and not something inherently wrong with the
> mailbox.  That is, once I delete the index files, the problem does not
> come back immediately.
> 
> I've seen others on the list with the same problem, but I wasn't able
> to find a workaround.  It's happening more and more frequently.
> 
> I guess what I don't understand is why Dovecot cant just mark the index
> invalid and purge it instead of failing over and over.  I thought the
> whole point behind Dovecot's indexing is that it was able to detect
> index inconsistencies and mark the index invalid.

For what it's worth, I set "mbox_lazy_writes = no" in dovecot.conf
and the problem hasn't happened all weekend.  Previously, it was
happening hourly.

It seems that there may be some lingering bugs in the lazy_write logic.
If anyone is running into this problem on a regular basis, I would
try disabling lazy writes and see if that helps.

I'm not sure why everyone isn't having this problem given how such
a stock vanilla configuration we're using, but maybe it's just related
to server volume.

--
Dean Brooks
dean at iglou.com


More information about the dovecot mailing list