[Dovecot] Re: mailbox corruption

Victor Duchovni Victor.Duchovni at MorganStanley.com
Wed Sep 14 20:59:20 EEST 2005


On Wed, Sep 14, 2005 at 12:42:44PM -0500, Noel Jones wrote:

> It might be worthwhile to try switching both dovecot and postfix to 
> one of the other available locking schemes, but I don't know if that 
> will help any.
> 

Locking of mailboxes is easy for delivery agents, they just
append. POP/IMAP servers need to be able to modify (delete, add flags,
...) messages in the middle of the mbox file. Doing so robustly requires
more than just locking, in order to not lose messages, the updates
need to be atomic.

This is why "popper" (now known as "qpopper") on which I collaborated in
the late 80s, makes a copy of the mbox file while it is working on it,
and the final update is a rename() (atomic).

People who use quotas are unhappy about this, and perhaps the copying
no longer happens (likely no longer robust also).

The appropriate robust combinations are:

    - mbox, with copy for modify and file *size* limits,
    not quotas, so a user can exceed the limit by 100% while
    a mailbox is being modified.

OR

    - maildir, with filesystem quotas.

However well other combinations may or may not work in typical practice,
they fail in theory, and that is good enough for me.

-- 
	Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomo at postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.


More information about the dovecot mailing list