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 invisibleroads, r.david.murray
Date 2010-11-30.17:05:53
SpamBayes Score 5.2940345e-06
Marked as misclassified No
Message-id <1291136757.37.0.0353161103665.issue10574@psf.upfronthosting.co.za>
In-reply-to
Content
Note that none of your examples are valid encoded words, so given that email currently does strict parsing, the fact that it is not attempting to decode those words is technically correct.  

However, I agree that it would be better for it to do a "best guess" decoding of the invalid encoded words.

It should be possible to "fix" this case by simply replacing '?==?' with '?= =?' before decoding (blanks between encoded words are ignored when decoding, per the RFC, which the author of the package producing these invalid headers probably didn't realize).

See also #1079 and #8132.

I have to think about whether or not all of these can be considered fixes (based on Postel's law) or if tolerant parsing should be considered a feature request.  I'll probably combine these into a single issue at some point.

Out of curiosity, which email program is it that is producing these invalid headers?
History
Date User Action Args
2010-11-30 17:05:57r.david.murraysetrecipients: + r.david.murray, invisibleroads
2010-11-30 17:05:57r.david.murraysetmessageid: <1291136757.37.0.0353161103665.issue10574@psf.upfronthosting.co.za>
2010-11-30 17:05:53r.david.murraylinkissue10574 messages
2010-11-30 17:05:53r.david.murraycreate