[Dovecot] Embedded From_ lines breaking Content-Length (and Dovecot)

Dean Brooks dean at iglou.com
Tue Jan 29 08:50:39 EET 2008


On Tue, Jan 29, 2008 at 04:09:26AM +0100, Lennart Lvstrand wrote:

> I feel like I'm going totally crazy.  Is it just me, or have embedded  
> From_ lines really been breaking mbox messages since (at least)  
> dovecot 1.0?
> 
> It's trivial to reproduce too -- just mail yourself a message with a  
> valid From_ line in it (assuming that your delivery system isn't doing  
> >From-escaping), or put it in a draft plain text message and save  
> it.  Then go and look in your Drafts folder...

The "mbox" format, by definition, uses From_ lines as *the* separator.
If it uses anything else, it's not conventional mbox format.  There
are variants of mbox, sometimes described as mboxcl2 that use
Content-Length: as the defining separator, but that is *not*
conventional mbox format.

I'm sure others will clarify Dovecot's stance on this, but relying on
Content-Length: headers as the sole source of determining message
separation is VERY risky business unless you make absolutely sure that
the values given are 100% correct and that all software touching the
mailbox are also in agreement (i.e. POP daemons, UNIX readers, procmail,
other IMAP daemons, etc.)

Because Dovecot cannot control existing values of Content-Length
headers, that seems to be an extremely risky proposition.

--
Dean Brooks
dean at iglou.com


More information about the dovecot mailing list