Re: [apps-discuss] I-D Action: draft-ietf-appsawg-malformed-mail-06.txt

Dave Cridland <dave@cridland.net> Tue, 18 June 2013 13:54 UTC

Return-Path: <dave@cridland.net>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CEC5A21F9F68 for <apps-discuss@ietfa.amsl.com>; Tue, 18 Jun 2013 06:54:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.962
X-Spam-Level:
X-Spam-Status: No, score=-1.962 tagged_above=-999 required=5 tests=[AWL=0.015, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0aTMIZPRXJPb for <apps-discuss@ietfa.amsl.com>; Tue, 18 Jun 2013 06:54:48 -0700 (PDT)
Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) by ietfa.amsl.com (Postfix) with ESMTP id 96F9021F9F67 for <apps-discuss@ietf.org>; Tue, 18 Jun 2013 06:54:48 -0700 (PDT)
Received: by mail-ob0-f180.google.com with SMTP id eh20so4503485obb.25 for <apps-discuss@ietf.org>; Tue, 18 Jun 2013 06:54:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cridland.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wRFA9oUcuobhksP8aPxjENLgkEaMzphZ4MHVllupWJU=; b=IVuvztnd0Y4WRh2Yk/ycHIqCqgnpWsAIP59HtSvrHTKMTtjbc9qUEGsPtbPiPqnvJN 3ValWNFrxYcaHRWoiFAVeDu0l6BNBLQrz/bLDbyW3a6Mbw5L74Xf5V1Cz+yb98ObOjFj oHQrn7ETTr51/RWdehBWZReELF0CiS0Z+Sfec=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=wRFA9oUcuobhksP8aPxjENLgkEaMzphZ4MHVllupWJU=; b=RRx3nAagTdzdsPJ/qHVMUWXWbfU5P9IcWaGge8LQD0cG+x+bMoGpxw4tiTcQnpXFTE 0wdTcGYNCYXfwelTfRf03WaE3HkAxy2Wktyh5ow66C9a/4KS4UWNqsrOO2PKV+mv0nnv DBqkBJapYID4guhrh/lOx6Z+RdjK87Zz3WLQ99KezSCx1PMErsmaD2cFrbEXgcpQ++qt fb8mymOufEqlZPvYX+/3ObdWfFVRixrS7q3RD7Ut6zmNVaGfPbl7U57AjRM3EyNRiFm6 VvSzyx4LoKJ5bYLv+y+NH8s5oSuV1ETXkhxUV5J/FhvPccwFc8Dmtgcd78XjTpD/p7k6 xsjg==
MIME-Version: 1.0
X-Received: by 10.182.24.131 with SMTP id u3mr12209298obf.29.1371563688056; Tue, 18 Jun 2013 06:54:48 -0700 (PDT)
Received: by 10.60.139.212 with HTTP; Tue, 18 Jun 2013 06:54:47 -0700 (PDT)
In-Reply-To: <01OUZHJ179TW000054@mauve.mrochek.com>
References: <20130618072301.24613.52745.idtracker@ietfa.amsl.com> <CAL0qLwaO1iOJT4XR9Z+qUVtPVJps39w2LBUD_UikJQ+Tm8TGBA@mail.gmail.com> <CAKHUCzxPyHrgRBPX9Qvhe2pQAEBRyRV9=-HQy8D56suo1xbbeg@mail.gmail.com> <01OUZHJ179TW000054@mauve.mrochek.com>
Date: Tue, 18 Jun 2013 14:54:47 +0100
Message-ID: <CAKHUCzyAAZybgHna_ZpqyCYd4UxLtev126906c0eA+0JAeYtyQ@mail.gmail.com>
From: Dave Cridland <dave@cridland.net>
To: Ned Freed <ned.freed@mrochek.com>
Content-Type: multipart/alternative; boundary="001a11c3025269f00804df6e0e6c"
X-Gm-Message-State: ALoCoQmgA+jKLSfUUxDagg0TMIV4DrGX9txoVOFxvoCg2y+kG2XrJhSzWUmjuVTl+2eY/I33fcoN
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] I-D Action: draft-ietf-appsawg-malformed-mail-06.txt
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
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: Tue, 18 Jun 2013 13:54:49 -0000

First off, I should say this was my first run-through, and I've not been
following the discussion - if things have been discussed to death already,
then feel free to shoot me down.

On Tue, Jun 18, 2013 at 2:10 PM, Ned Freed <ned.freed@mrochek.com> wrote:

> > On Tue, Jun 18, 2013 at 8:27 AM, Murray S. Kucherawy <
> superuser@gmail.com>wrote:
>
> > >
> > > Anyone else interested in providing feedback on it?  Should I poke
> > > Salvatore to start the machine?
> > >
>
> > §6, last para should explicitly state this is only a suitable fixup for
> > text/plain and text/html; and even then only in known character encodings
> > (charsets), such as ASCII, ISO 8859, and UTF-8. I'd hate everyone to
> > "correct" the 0x0A octets in my JPEGs.
>
> Disagree. This section is talking about processing messages as a whole
> as received via SMTP, prior to MIME interpretation.
>
> What needs to be made clear is that this is talking about SMTP
> specificially,
> not interpretation of MIME entities. And it probably should note that
> it doesn't apply to binary SMTP.
>
>
Right, I'd misunderstood the notion. So yes, it was the paragraph before
derailling me, because it starts discussing ASCII. I think if it merely
said that bare CRs and LFs were uncommon in non-binary messages, we'd be
good here.

   Within modern Internet Mail it is highly unlikely that an isolated CR
   or LF is valid in a message, outside of binary transfers [BINARY].
 Furthermore [MIME] presents
   mechanisms for encoding content that actually does need to contain
   such an unusual character sequence.



> > I'm concerned with §7.1.4's implication that implementations should be
> > looking for possibly email addresses in header field comments. I'm happy
> > that a bare ")" should be treated as a literal, but I'm wary of the
> > possibility of "hiding" email addresses in comments. Overall, I'm
> inclined
> > to say I'd prefer that we advised that an unterminated comment in a
> header
> > field value were treated as being terminated at the end of the value.
>
> I'm ambivalent about this one. It's quite true that addresses are sometimes
> hidden in comments, but as a practical matter, anyone who does that as
> opposed
> to removing the address outright and then gets the syntax wrong kinda
> deserves
> what they get.
>
>
What's concerning me here is that I wouldn't want to be trying to parse
comments in the hope of finding things there. I'd rather assume that the
error with an unterminated comment was the lack of termination, not that it
might contain something useful I should go hunting for.


> > I have similar concerns with $7.1.6 - more so because I suspect that "Foo
> > local@example.net could also be interpreted as "Foo local"@example.net.
>
> Well, of the three, which do you think is more likely to have been the
> intent?
>
>        To: "Joe <joe@example.com>"@example.net
>        To: "Joe" <joe@example.com>
>        To: "Joe joe"@example.net
>
> Yes, they're all legal, but in practice how often do you see local parts in
> valid addresses containing angle brackets and spaces?
>
>
Bear in mind I worked for Isode for years, so I've built up a strong
immunity to local parts with spaces due to MIXER, but in any case the
middle one is likely to be the intent. However I'm again concerned that it
means finding an unterminated phrase and back-tracking to see if the phrase
"looks interesting".


> > §7.5 mentioned the case of two From fields - it doesn't mention the
> > possibility of combining the two, so:
>
> > From: First <first@example.org>
> > From: Second <second@example.net>
>
> > ... could become:
>
> > From: First <first@example.org>, Second <second@example.net>
>
> > Obviously you'd need to inject a Sender field as needed (as per §7.6 of
> > this memo).
>
> > I'm not suggesting it has to offer this, but I'm wondering if the lack of
> > offer is intentional?
>
> I hadn't considered this. It's kind of an interesting idea, but given the
> issues that arise in practice when more than one address is present in a
> From:
> field, I have doubts about its utility.
>
>
Yes, multiple addresses in a From is unusual; but I'd have thought that
collapsing multiple header fields into one would in general be sane?
(Another example might be concatenating two subject header fields into one
longer one).


> > §9.1 describes a technique of breaking lines at points that make no
> > semantic difference. Given the poor NLP capability in the majority of
> > deployed MTAs, I'm slightly suspect of this advice. Even without any
> snark
> > at all, cases such as format=flowed (and other message quoting) could
> > easily be warped or broken by breaking lines.
>
> Strongly disagree. The alternative of encoding oversized lines may not be
> practical, so the choices are truncate or wrap. The chances that truncation
> is going to produce better results than wrapping are pretty low.
>
> And I'm not even slightly sympathetic about the possible damage done due to
> lack of NLP knowledge in MTAs. If you want your format=flowed material to
> arrive intact, don't spew out illegal garbage.
>

Happy to let your strong disagreement trump my slight suspicion.

Dave.