Re: [apps-discuss] Pete Resnick's Yes on draft-ietf-appsawg-malformed-mail-10: (with COMMENT)

Ned Freed <ned.freed@mrochek.com> Thu, 28 November 2013 17:14 UTC

Return-Path: <ned.freed@mrochek.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 83C981AE17D for <apps-discuss@ietfa.amsl.com>; Thu, 28 Nov 2013 09:14:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.903
X-Spam-Level:
X-Spam-Status: No, score=-1.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9oNGkyYYqDXZ for <apps-discuss@ietfa.amsl.com>; Thu, 28 Nov 2013 09:14:17 -0800 (PST)
Received: from mauve.mrochek.com (mauve.mrochek.com [66.59.230.40]) by ietfa.amsl.com (Postfix) with ESMTP id 892ED1AE058 for <apps-discuss@ietf.org>; Thu, 28 Nov 2013 09:14:17 -0800 (PST)
Received: from dkim-sign.mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243) id <01P1BCHFON6O001NPM@mauve.mrochek.com> for apps-discuss@ietf.org; Thu, 28 Nov 2013 09:09:13 -0800 (PST)
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET="iso-8859-1"; format="flowed"
Received: from mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243) id <01P18HARGJGG00004G@mauve.mrochek.com>; Thu, 28 Nov 2013 09:09:07 -0800 (PST)
Message-id: <01P1BCHD8JTY00004G@mauve.mrochek.com>
Date: Thu, 28 Nov 2013 08:25:52 -0800
From: Ned Freed <ned.freed@mrochek.com>
In-reply-to: "Your message dated Wed, 27 Nov 2013 09:36:54 -0600" <52961196.5080700@qti.qualcomm.com>
References: <20131120223533.8958.23858.idtracker@ietfa.amsl.com> <CAL0qLwbH0e_Z-9OKNf3cJ9RpsRLK6vmnQtfj8dbZkLxmz2GaRA@mail.gmail.com> <01P14CWFCE5A00004G@mauve.mrochek.com> <5294DDEE.4070000@qti.qualcomm.com> <CAL0qLwY4Zbig3pb9W41fo5ttt2FgLPyOwPxLFQFJuUTtO5D75A@mail.gmail.com> <01P19CETU4PU00004G@mauve.mrochek.com> <52961196.5080700@qti.qualcomm.com>
To: Pete Resnick <presnick@qti.qualcomm.com>
Cc: "draft-ietf-appsawg-malformed-mail@tools.ietf.org" <draft-ietf-appsawg-malformed-mail@tools.ietf.org>, Ned Freed <ned.freed@mrochek.com>, IETF Apps Discuss <apps-discuss@ietf.org>, SM <sm+ietf@elandsys.com>, "appsawg-chairs@tools.ietf.org" <appsawg-chairs@tools.ietf.org>
Subject: Re: [apps-discuss] Pete Resnick's Yes on draft-ietf-appsawg-malformed-mail-10: (with COMMENT)
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss/>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Nov 2013 17:14:19 -0000

(IESG dropped from this since they have better things to do than discuss
message format arcana.)

> Actually, that's not quite true. The spec is clear that the Return-Path:
> is always on top of it's associated Received: fields.

I'm skeptical of this claim. RFC 5322 section 3.6 states:

   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.  However, for the purposes of this specification,
   header fields SHOULD NOT be reordered when a message is transported
   or transformed.  More importantly, the trace header fields and resent
   header fields MUST NOT be reordered, and SHOULD be kept in blocks
   prepended to the message.  See sections 3.6.6 and 3.6.7 for more
   information.

Seems to me this says that trace fields can't be reordered once they are
generated, but at the same time this appears to provide carte blanche for a
given operation adding trace fields to do it in any order it pleases.

And even if you believe that the ABNF showing that return-path comes first
within a given block overrides this text, there's also the fact that a header
"block" is itsef an ill-defined notion. I can easily envision an implementation
that adds return-path and one received field at one step, followed by
another process that adds another received field to log some additional
processing done to the message.

Since the specification never comes out and says that a given
create/submit/relay/deliver step MUST only add a single block of trace fields,
you've completely lost the ability to call an implementation incompliant when
it meets the technical requirements of the ABNF by generating multiple blocks
during one of these operations.

> And though not  crystal clear, it certainly implies that the Resent-Fields: get 
> prepended *before* being reintroduced into the transport system, which  is what
> ought to be prepending the Received: and Return-Path: fields.

The situation with resent-* is, if anything, worse. It would be one thing if
resent-* were associated exclusively with a particular sort of manual message
submission operation, which necessarily occurs after final delivery and thus if
everything is working perfectly will result in a clear ordering of blocks.

But RFC 5322 doesn't restrict resent-* fields to that role. And that means
that you cannot count on a delivery event having occurred prior to the
"reintroduction" event that's adding the resent-* fields.

Just as one example, sieve redirect can easily be seen to meet the criteria of
RFC 5322 section 3.6.6 irrespective of whether or not it's done prior to final
deliver, and in practice some sieve implementations operating before final
delivery do add resent- fields. (We provide it as an option in our
implementation.) How this then maps onto a particular set of block additions to
the message is anyone's guess.

				Ned