This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients barry, msapiro, r.david.murray, terry.reedy
Date 2010-08-06.20:39:34
SpamBayes Score 7.0743245e-11
Marked as misclassified No
Message-id <1281127177.2.0.647065462092.issue1443866@psf.upfronthosting.co.za>
In-reply-to
Content
It's not clear to me that this is a valid bug.  It is true that the RFC says that a blank line preceeds the body.  However, the line in question is not a valid header line.  Mail parsers trying to implement the "be liberal in what you accept" portion of Postel's law should parse messages that where the blank line between the headers and body is missing.  With the input given, there are three valid Postel interpretations: the body starts at the >From line, the >From line is missing a folding indent and is part of the value of the preceding header, and the >From line is garbage and should be discarded.

Since a leading >From is a token that occurs validly with reasonable frequency in message bodies and is never valid in message headers, I think the current choice is a sane one.  A smarter heuristic might look at the subsequent line and note that they look like headers, but headers can occur in the body of messages, so that heuristic would probably be wrong more often than it was right.  Especially considering that putting headers in a message body is the time when you are most likely to see the leading '>From ' token, since it would be quoting the mbox 'From ' header.

So, I'm closing this bug as rejected.  (Rejected rather than invalid, since reasonable people can certainly disagree about the best heuristics for handling invalid data.)
History
Date User Action Args
2010-08-06 20:39:37r.david.murraysetrecipients: + r.david.murray, barry, terry.reedy, msapiro
2010-08-06 20:39:37r.david.murraysetmessageid: <1281127177.2.0.647065462092.issue1443866@psf.upfronthosting.co.za>
2010-08-06 20:39:35r.david.murraylinkissue1443866 messages
2010-08-06 20:39:34r.david.murraycreate