Re: [ietf-smtp] Is this a valid Message-ID header ?

John C Klensin <john-ietf@jck.com> Fri, 06 March 2020 17:25 UTC

Return-Path: <john-ietf@jck.com>
X-Original-To: ietf-smtp@ietfa.amsl.com
Delivered-To: ietf-smtp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 95A893A0BC7 for <ietf-smtp@ietfa.amsl.com>; Fri, 6 Mar 2020 09:25:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 sqUZ1hqYOSwW for <ietf-smtp@ietfa.amsl.com>; Fri, 6 Mar 2020 09:25:00 -0800 (PST)
Received: from bsa2.jck.com (ns.jck.com [70.88.254.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4F7CE3A0BD3 for <ietf-smtp@ietf.org>; Fri, 6 Mar 2020 09:25:00 -0800 (PST)
Received: from [198.252.137.10] (helo=PSB) by bsa2.jck.com with esmtp (Exim 4.82 (FreeBSD)) (envelope-from <john-ietf@jck.com>) id 1jAGiW-0006Jl-Pi; Fri, 06 Mar 2020 12:24:56 -0500
Date: Fri, 06 Mar 2020 12:24:50 -0500
From: John C Klensin <john-ietf@jck.com>
To: Ned Freed <ned.freed@mrochek.com>, John R Levine <johnl@taugh.com>
cc: ietf-smtp@ietf.org
Message-ID: <8A038F33582A9A5BA1E43AD6@PSB>
In-Reply-To: <01RI6FBD2O66000058@mauve.mrochek.com>
References: <20200305043414.0E7C515740C2@ary.qy> <87055.1583465260@turing-police> <9DF11014-4C79-49DE-B17E-12B87F2FF17C@isc.org> <alpine.OSX.2.22.407.2003052339010.19976@ary.qy> <961C7C4EA24A110554D88BFA@PSB> <alpine.OSX.2.22.407.2003061129530.22046@ary.qy> <01RI6FBD2O66000058@mauve.mrochek.com>
X-Mailer: Mulberry/4.0.8 (Win32)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-SA-Exim-Connect-IP: 198.252.137.10
X-SA-Exim-Mail-From: john-ietf@jck.com
X-SA-Exim-Scanned: No (on bsa2.jck.com); SAEximRunCond expanded to false
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/NoQQ7qlRo6uOzTIuR0raZSkzGqU>
Subject: Re: [ietf-smtp] Is this a valid Message-ID header ?
X-BeenThere: ietf-smtp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of issues related to Simple Mail Transfer Protocol \(SMTP\) \[RFC 821, RFC 2821, RFC 5321\]" <ietf-smtp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf-smtp/>
List-Post: <mailto:ietf-smtp@ietf.org>
List-Help: <mailto:ietf-smtp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Mar 2020 17:25:03 -0000

Ned,

Complete agreement.  And thanks for reminding me/ us about the
additional details.   An additional problem with at least the
ones of these Message-ID (and occasionally the mailbox addresses
in "From:" header fields) is that there is no "@" present in the
encoded form.  So anything that follows the principle of parsing
before trying to do any decoding will fail; only those systems
that, contrary to the clear intend of the spec (for the reason
you give), decode everything that looks like an encoded word
before examining or parsing the relevant fields has even a
chance of imagining that these things are valid.

best,
   john


--On Friday, March 6, 2020 08:37 -0800 Ned Freed
<ned.freed@mrochek.com> wrote:

> The main issue here is that encoded-words are are only defined
> in the
> context of specific pieces of RFC 5322 syntax, and done in a
> way so that
> they don't break the syntax. This is essential so that agents
> that don't
> support RFC 2047 won't have a problem. So this business of
> encoding the
> whole header field, which wrecks the syntax, is simply broken.
> 
> However, this doesn't mean something that things which meet
> the syntax criteria
> for encoded words can't appear in other contexts. For example,
> nothing prevents
> you from using an encoded word as a local-part of an address.
> But if you do,
> its interpretation is just that of a local-part, which is a
> local matter by
> definition. And it can't break the overall syntax of the field.
> 
> The larger problem is that a lot of agents blindly decode all
> the encoded words
> they find in a field, rather than parsing first and only
> undoing the ones that
> appear in specific places where they have meaning. This has
> the effect that a
> lot of invalid encoded-word usage works, kinda sorta.
> 
> And yes, we were well aware that this would be a problem when
> the RFC was
> written. The problem is every other approach we came up with
> had even bigger
> issues. Keith deserves a lot of credit for this work.
> 
> 				Ned
> 
>> On Fri, 6 Mar 2020, John C Klensin wrote:
>> > In the interest of clarity, what you are referring to as
>> > "MIME entities" are encoded words as specified in RFC 2231.
>> > Right?
> 
>> Right.
> 
>> > And because encoded words are not permitted in Message-IDs
>> > or the other fields you mention, those fields must conform
>> > to the specified syntax without decoding.   If they don't,
>> > it is pretty much up to the receiving system what to do
>> > about it. ...
> 
>> That was my understanding, too.  I'm finding these MIME
>> message-ID's in the IETF's IMAP server, so now I'm wondering
>> if they were in the original message.  Here's one that showed
>> up today.  I think they're all from Microsoft.
> 
>> https://mailarchive.ietf.org/arch/msg/last-call/xTEWTOyy4HOX-
>> wyvFVaOicn2P-I/#
> 
>> Regards,
>> John Levine, johnl@taugh.com, Taughannock Networks,
>> Trumansburg NY Please consider the environment before reading
>> this e-mail. https://jl.ly
> 
>> _______________________________________________
>> ietf-smtp mailing list
>> ietf-smtp@ietf.org
>> https://www.ietf.org/mailman/listinfo/ietf-smtp