From: Russ Allbery (rra@stanford.edu)
Date: Fri Sep 13 2002 - 21:27:51 CDT
Charles Lindsey <chl@clw.cs.man.ac.uk> writes:
> Yes, that is the position we are at, more or less. It is up to the guy
> who implements the injector to decide whether to encapsulate, or whether
> to encode everything regardless, or to leave things alone where he knows
> that it will get through the mail transport intact (e.g. by looking for
> characters in 0x80-9f as you suggest, and by not bothering in the case
> of headers within deeply nested MIME multiparts).
Thankfully, headers within deeply nested MIME multiparts aren't a problem
by definition since by definition they cannot contain 8-bit characters.
MIME attachments can contain 8-bit characters, but they're just data, and
the mail system can handle them correctly by changing the CTE. In order
for something in a MIME multipart to be a "header", it would either need
to be part of the MIME structure, in which case it's required to be
encoded per RFC 2231, or it's in a message/* type, in which case it's
required to use 7-bit encoding in the headers.
So any 8-bit characters in the "headers" of a MIME multipart are in
violation of the relevant standards, and any mangling that results is the
fault of whatever software generated such a message. This is the reason
why the standards make those sorts of guarantees, to keep software from
having to do unreasonable amounts of work like parse nested MIME structure
just to relay a message to a moderator.
-- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>