ietf-smtp
[Top] [All Lists]

Re: "Header Reordering", yet again

2005-05-27 09:42:54


On Fri May 27 2005 10:09, David MacQuigg wrote:

At 01:05 PM 5/23/2005 -0400, Bruce Lilly wrote:

Except for a few inconvenient facts:
a) "It is important to note that the header fields are not guaranteed to
   be in a particular order.  They may appear in any order, and they
   have been known to be reordered occasionally when transported over
   the Internet." RFC 2822, section 3.6

Here is the complete quote:

That doesn't change the fact that there is no guarantee, and that any
assumption of a particular order is flawed.

Furthermore:
    """When an SMTP server

Not all transport is via SMTP (while a given entity may use SMTP, there
is no guarantee that *ALL* preceding "hops" in the store-and-forward
transport chain used SMTP (nor, that *ALL* SMTP hops were conformant to
RFC 2821, a Proposed Standard)).

Bingo. I hadn't considered it, but of course it is obvious that messages
passing through to, say, X.400 aren't going to preserve header order. (This in
spite of the fact that some of these system do have the ability to preserve
nonstandard fields - in the case of X.400 through the use of  a heading
extension.)

And the concept of being able to accomodate such systems goes way back -
there's discussion of some of the issues in RFC 821 and probably in earlier
specifications as well.

This could even result in reordering of trace fields in some cases, especially
if clocks are out of sync (which they often are). The mapping of trace fields
to X.400 in particular is pretty complicated.

Moreover, specific exceptions are granted
to gateways and MSAs, and there is no reliable way to determine if an SMTP
receiver operating on port 25 is a gateway or MSA; there are no gateway- or
MSA-sepcific response codes nor are there any ESMTP keywords that indicate
to a client "this is a gateway" or "this is an MSA".

Nor is it clear what such codes would actually mean, let alone what a
client would do to accomodate something it didn't like.

There is certainly
no way that a subsequent analysis of the message can make any kind of
reliable assessment of whether or not any receiver that putatively handled
the message in transit was a gateway or MSA.

More precisely, there are times when you can tell a gateway was involved,
but there's no way to be sure one _wasn't_ involved.

And by the time one has a message in a place where it can be examined, it
might not even be in the Internet Message Format per se.  I am told (but
have no independent confirmation) that systems such as Lotus Notes and
Microsoft Exchange do not indicate (to applications accessing content
for filtering) field order.

Any time some fields are mapped to a native format and others aren't
coordinating between the two is going to be impossible. Any X.400 system will
have this issue.

                                Ned