Debian #295435: Mis-parsing mbox file From lines
|Assignee:||Hiroyuki Yamamoto||% Done:||
Debian forwarded bug http://bugs.debian.org/295435
Submitter provides a patch also (see message http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295435#70).
Quoting original submitter:
The /var/mail/USER mbox files are documented in:
file:/usr/share/man/man5/mbox.5.gz (mutt package)
file:/usr/share/man/man8/mail.local.8.gz (sendmail package)
to have messages starting at "From " lines following empty lines. However,
sylpheed looks for "From " lines followed by lines that might be a header.
As an example, sylpheed will mis-parse a message containing
You asked about my laptop.
From memory, the MAC adress is
Hope you can set DHCP for it.
(seeing a bogus new message at the From line).
Checking that the "From " line is followed by a header may be useful; but
sylpheed MUST check that the "From " line follows a blank line (or is at
the beginning of the file).
Updated by Hiroyuki Yamamoto over 1 year ago
Ricardo Mones wrote:
Quoted from the above document:
HOW A MESSAGE IS READ
A reader scans through an mbox file looking for From_ lines.
Any From_ line marks the beginning of a message. The reader
should not attempt to take advantage of the fact that every
From_ line (past the beginning of the file) is preceded by a
So I recognized Sylpheed should NOT check the previous blank line.
The program then copies the message, applying >From quoting
to each line. >From quoting ensures that the resulting
lines are not From_ lines: the program prepends a > to any
From_ line, >From_ line, >>From_ line, >>>From_ line, etc.
Since every From_ lines in a message body are quoted,
Sylpheed will not misparse the mbox.
Updated by Ricardo Mones over 1 year ago
So, was either a bug on the MDA not escaping correctly the From, or the MDA was writting a mbox variant not supported by Sylpheed, which seems to be a mboxrd reader (from the same document you quoted):
mboxcl format is like mboxo format, but includes a Content-
Length field with the number of bytes in the message.
mboxcl2 format is like mboxcl but has no >From quoting.
These formats are used by SVR4 mailers. mboxcl2 cannot be
read safely by mboxrd readers.
I believe adding a note that mboxcl2 format is not supported is enough to close this bug (finally after more than 6 years! :)