[Mailman-Users] Garbled headers - was: gmail marks mailman confirmation mail as spam...

Mark Sapiro mark at msapiro.net
Sun Jun 14 19:39:32 CEST 2009

Kārlis Repsons wrote:
> On Sunday 14 June 2009 17:12:22 you wrote:

>> Kārlis forwarded an email to me off list. It's salient feature is the
>> subject header
>> Subject: skatamies, cik ilgi google =?utf-8?q?m=C4=93=C4=A3ina?=
>> =?utf-8?q?_nog=C4=81d=C4=81t?=, kad nevar...
>> which is wrapped here but was all one line in the original. I have
>> verified that there is a problem in the underlying Python email package
>> with headers containing multiple RFC 2047 encoded words whether or not
>> they are separated by non-encoded text.

Actually, the problem is not multiple encoded words. It is the fact that
 Python's email.header.decode_header() function doesn't recognize an RFC
2047 encoded word as such if the trailing "?=" is not followed by
whitespace or the end of the string - here it is followed by a ",".

I think this is a bug in decode_header(), but I won't have time to look
further at this until tomorrow.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list