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

Stephen J. Turnbull stephen at xemacs.org
Mon Jun 15 05:47:12 CEST 2009

Mark Sapiro writes:

 > I think there is a minor bug in decode_header() in that it won't
 > recognize a RFC 2047 encoded word in a comment if the encoded word is
 > not separated by whitespace from the ")" that terminates the comment.
 > However, this is the only place where an encoded word need not be
 > followed by whitespace or the end of the header.

Indeed that's a bug.  I gather that you're saying that this bug is not
the cause of the OP's problem, though?

 > The Subject: header above is non-compliant in two respects. It is too
 > long.  [...]  However, decode_header will accept it anyway and do
 > the right thing.

As it should, according to the Postel Principle.  Anyway, IIRC the
length limit is a SHOULD NOT, not a MUST NOT, right?

 > real problem is item (1) in section 5 of the RFC says in part:
 >     Ordinary ASCII text and 'encoded-word's may appear together in the
 >     same header field.  However, an 'encoded-word' that appears in a
 >     header field defined as '*text' MUST be separated from any adjacent
 >     'encoded-word' or 'text' by 'linear-white-space'.
 > The header above does not comply with this.

Agreed, but I think that by default[1] email should try to parse this
header as the user intended it.  It's not like encoded-words are that
easy to confuse with intended text; it's unlikely that changing
'linear-white-space' above to 'linear-white-space or specials' would
harm anyone.

 > This is a problem with the MUA (mail client) that encoded the Subject:
 > header in the first place.

Agreed, but I think following the Postel Principle here is likely to
do less harm than adhering strictly to the RFC.

That said, I'm not in a position to contribute code, and this is a
pretty invasive change, so the user is unlikely to see a version of
Mailman that handles this any time soon.  They are likely to have more
luck switching clients.

[1]  Ie, there should be an option to be strict.

More information about the Mailman-Users mailing list