Re: [ietf-smtp] Address transformations

Sean Leonard <dev+ietf@seantek.com> Mon, 01 August 2016 02:25 UTC

Return-Path: <dev+ietf@seantek.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 8D40B12B05E for <ietf-smtp@ietfa.amsl.com>; Sun, 31 Jul 2016 19:25:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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 d3ufRv9nCGnO for <ietf-smtp@ietfa.amsl.com>; Sun, 31 Jul 2016 19:25:25 -0700 (PDT)
Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2F21B128874 for <ietf-smtp@ietf.org>; Sun, 31 Jul 2016 19:25:25 -0700 (PDT)
Received: from [192.168.123.110] (unknown [75.83.2.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 49F22509B8 for <ietf-smtp@ietf.org>; Sun, 31 Jul 2016 22:25:24 -0400 (EDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Sean Leonard <dev+ietf@seantek.com>
In-Reply-To: <C4C7CFAD81036E3F1095F39F@JcK-HP8200>
Date: Sun, 31 Jul 2016 19:25:23 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <53AEDA75-99FC-491A-8B1B-028A8B773D8B@seantek.com>
References: <20160731133547.45914.qmail@ary.lan> <96F384E1DAAADB3587A45240@JcK-HP8200> <alpine.OSX.2.11.1607311215550.79626@ary.lan> <C4C7CFAD81036E3F1095F39F@JcK-HP8200>
To: ietf-smtp@ietf.org
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/krmiBTLUMMyzW8_19nOAZ3BqLsQ>
Subject: Re: [ietf-smtp] Address transformations
X-BeenThere: ietf-smtp@ietf.org
X-Mailman-Version: 2.1.17
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: Mon, 01 Aug 2016 02:25:26 -0000

(RFC 5321)
All this stuff brings up a very interesting point about deliverable email addresses in draft-seantek-mail-regexen:

What are the domain part limitations on deliverable email addresses, that are not encapsulated by the RFC 5321 ABNF?

Specifically:
The domain production is limited to 253 characters. I am sure of this.
Each sub-domain production is limited to 63 characters. I am also sure of this.

I strongly believe that domain productions cannot be parseable IPv4 addresses. (Note: they can never be parseable as IPv6 addresses, as that would require : which is not part of a domain production.)

Consider:

foo@1.2.3.4

The string “1.2.3.4” is a valid domain production. However, it is not (or *should not*) be considered a deliverable email address, because when passed to the famous function “gethostbyname”, that function will certainly return 1.2.3.4; it will not perform a lookup of the domain record with a top-level label of “4”. This is also supported by RFC 1912: “Labels may not be all numbers”. But an individual label can be a number, such as “411.org”.

I have tried “foo@1.2.3.256” -- Windows and Unix/Linux stacks will try to query the DNS for that string and not parse it as IPv4. So, it is syntactically a valid, deliverable email address. But foo@411 will get IPv4-parsed to 0.0.1.155, which means that “411” should not be considered a valid domain name for a deliverable email address.

True? Are there other limitations?

Sean