Re: [ietf-smtp] How wrong is this EAI implementation

John C Klensin <john-ietf@jck.com> Sat, 20 June 2020 21:03 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 587F03A098E for <ietf-smtp@ietfa.amsl.com>; Sat, 20 Jun 2020 14:03:37 -0700 (PDT)
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 NqCNUGWkor5u for <ietf-smtp@ietfa.amsl.com>; Sat, 20 Jun 2020 14:03:35 -0700 (PDT)
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 7546B3A094D for <ietf-smtp@ietf.org>; Sat, 20 Jun 2020 14:03:35 -0700 (PDT)
Received: from localhost ([::1] helo=jkacere15) by bsa2.jck.com with esmtp (Exim 4.82 (FreeBSD)) (envelope-from <john-ietf@jck.com>) id 1jmkeA-0006q5-Tp; Sat, 20 Jun 2020 17:03:30 -0400
Date: Sat, 20 Jun 2020 17:03:29 -0400
From: John C Klensin <john-ietf@jck.com>
To: John R Levine <johnl@taugh.com>
cc: ietf-smtp@ietf.org
Message-ID: <2B0EB3A9E99431F86620038A@[10.1.10.18]>
In-Reply-To: <alpine.OSX.2.22.407.2006201429080.28792@ary.qy>
References: <alpine.OSX.2.22.407.2006201429080.28792@ary.qy>
X-Mailer: Mulberry/4.0.8 (Win32)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-SA-Exim-Connect-IP: ::1
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/iaAr8IvYdgU2XxBDCDGPFlfSq_I>
Subject: Re: [ietf-smtp] How wrong is this EAI implementation
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: Sat, 20 Jun 2020 21:03:37 -0000

John,

IIR (I have not gone back and reread the spec), conversion of
the domain name to A-labels is strongly discouraged at any point
prior to the MSA or MTA actually looking up the domain name so a
connection can be opened.  For message headers (including not
just the "From:" header field but trace fields, etc.), it is
even more strongly discouraged: the intent was "restricted UTF-8
all the way" and "making users look at A-labels is just looking
for trouble".  However, the intent with IDNA (and, I think, the
push for IRIs) was much the same, keeping internal forms and
users separated and the latter working with native-character
forms to the extent possible.  However, the specs recognized
that exceptional circumstances could arise and therefore stop
short of complete prohibitions.

I haven't thought it through but, somehow, converting domains in
backward-pointing addresses (what do they do to/with
"Reply-to:"?) seems more, rather than less, offensive than
forward-pointing ones.

So, again relying on memory, the behavior you describe is in bad
taste and almost certainly represents bad judgment, but may not
actually be non-conforming.  I'll leave the question of how far
on that spectrum an implementation needs to lie to be considered
"broken".

  john

--On Saturday, June 20, 2020 14:54 -0400 John R Levine
<johnl@taugh.com> wrote:

> I am poking at the widely used Roundcube web mail package.
> 
> One of my test addresses is 测试@电子邮件测试.中国
> 
> When I enter it into Roundcube as a username, it turns the
> domain into a-labels,
> 测试@xn--5nqx41au4nqohsp3axcg.xn--fiqs8s and uses that as
> the address in the From: line, and to authenticate to IMAP and
> submission.  I can understand where that came from, but it
> still seems wrong.
> 
> Addresses that I put on the To: line seem unmolested.
> 
> Regards,
> John Levine, johnl@taugh.com, Taughannock Networks,
> Trumansburg NY
> Please consider the environment before reading this e-mail.
> https://jl.ly