Re: [Mutt] #714: Lines starting From aren't escaped saving from Maildir to mbox
#714: Lines starting From aren't escaped saving from Maildir to mbox
Comment (by vinc17):
Replying to [comment:17 rtc]:
> From_ must be quoted in some way; if not, the end of the message cannot
be uniquely determined anymore.
No, with some formats, it doesn't need to be quoted. Also, if a line
starting with "From" doesn't have the expected format, it doesn't need to
be quoted. Mutt does this check when reading a mailbox (if the Content-
Length is either incorrect or missing).
> To the best of my knowledge, procmail, exim and postfix never read from
a mailbox (correct me if I am wrong), but only append to it, so they never
have to assume a mailbox format, but only write messages in one.
To write a message, they need to assume a format. For instance, if some
message contains a line starting with ">From ", it will have to be written
as ">From " in mboxo (this is what procmail, exim and postfix do), but it
will have to be written as ">>From " in mboxrd.
> Assuming mboxrd format when reading a mail from a mboxo format mailbox
has not more problems than assuming mboxo format when reading a mail from
a mboxo format mailbox.
This is incorrect. Assuming that in general, a line starting with "From "
doesn't need to be quoted (see above), assuming mboxo format will lead to
fewer message "corruptions".
> > No information is lost when the mail is written. It is lost only when
the mail is stored to some mbox format.
>
> In fact, it is only lost when the mail is stored to some mbox format
other than mboxrd.
No (see above).
> There is no such thing as "the mbox format". It is always better to
assume mboxrd. It has the clear advantage that the message is retrieved
correctly at least for one case: The case that the file was written in
mboxrd format.
No, this is wrong (see above).
> I am not exactly sure whether you have understood the problem that
mboxrd solves. mboxo mailboxes always involve a loss of information.
No, this is wrong. If you have no lines starting with "From " (or if the
software is smart enough to detect that they don't need to be quoted, that
is, most of the time), there is no loss of information.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/714#comment:18>