On Tue, Oct 05, 2004 at 05:55:27PM +0300, Timo Sirainen wrote:
(and in fact mutt, up to 1.4.2.1 at least, is broken in the way it recognizes "From " lines if the content-length is missing: specifically, it would recognize "From " lines even if not preceded by a blank line.. I patched it here.)
I don't think From-line has to be preceded by empty line? My understanding is that mbox works like:
From ... LF message text LF
Depends on your semantics I think :-) An entire message in an mbox ends with a blank line, so anything but the first "From " line in a mbox will be preceded by a blank line. Thus a naive way to find the start of a new message is to look for "From " lines following a blank line, and this is one of the things that ">From "quoting is all about.
At any rate, I ran across cases where there would be:
some non-blank text in the middle of a message body
From <valid-looking From line syntax>
and mutt, when there was no Content-length and it was trying to find the next message boundary, would see this as the start of a new message. Every other mail program that I tried would get it right; mutt did not. The unquoted "From " does occur in the wild when not following a blank line; it's fairly standard *not* to quote a "From " line that does not follow a blank line. For example, see:
http://www.ietf.org/internet-drafts/draft-hall-mime-app-mbox-02.txt
which attempts to summarize or reference some of the accepted variations on mbox formats.
Also, I think mutt's (and others) use of Content-length is an optimization that lets it avoid scanning every mbox line to skip from one message to the next, but doesn't relieve it of the necessity of "From " line quoting.
mm