[Dovecot] Blank lines in mailboxes

Mark E. Mallett mem at mv.mv.com
Tue Apr 26 19:29:22 EEST 2005


On Tue, Apr 26, 2005 at 06:16:43PM +0300, Timo Sirainen wrote:
> On Tue, 2005-04-26 at 16:19 +0200, Jakob Curdes wrote:
> >  >> At the beginning of the file?
> >  >>
> >  >> 0.99.x's mbox handling isn't too good and it's known to cause this
> >  >> sometimes. 1.0-stable releases have rewritten mbox support which fixes
> >  >> this.
> >  >
> > But why does this phenomenon start now ? We had this once in a while, now I have 3-4 mailboxes per day that  are affected. Could it be a load-related problem ?
> 
> No idea. If I knew what the problem was and when it would happen, I
> would have fixed it.

Does it detect writing to a zero-length existing file? 

You might consider being liberal when opening an mbox file, and skipping
any blank lines prior to the first "From_", although this might be
unsettling to some people.

Kinda funny: I once encountered a UNIX mail utility that would always
append messages to mbox files with a leading blank line even if the file
was empty (i.e.  it would create new mbox files with a leading blank
line), but would refuse to open any mbox files that began with a blank
line.  Dunno how it survived in the wild... I suspect it was some broken
interim version, but at any rate I hacked it to keep it from writing the
blank line, *and* to skip blank lines when opening up an mbox.

mm




More information about the dovecot mailing list