Bug #9

Debian #295435: Mis-parsing mbox file From lines

Added by Ricardo Mones about 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:12/14/2011
Priority:NormalDue date:
Assignee:Hiroyuki Yamamoto% Done:


Category:SylpheedSpent time:-
Target version:3.2


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).


#1 Updated by Hiroyuki Yamamoto almost 7 years ago

Ricardo Mones wrote:


Quoted from the above document:

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
blank line.

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.

#2 Updated by Ricardo Mones almost 7 years ago

All right,

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! :)


#3 Updated by Hiroyuki Yamamoto almost 7 years ago

  • Status changed from New to Closed

Also available in: Atom PDF