Subject: [EAI] header (822) address syntax

From: Tony Finch <[email-masked]>
Date: Fri, 11 Aug 2006 02:08:39 +0100

One long-standing ugliness in the Internet email standards is the
difference between the 821 and 822 syntax for email addresses (even if you
ignore differences in where [CFWS] is permitted). Unfortunately the
current EAI drafts make the difference bigger not smaller. The reason some
of us suggested putting the downgrade information in the "path" part of
MAIL and RCPT commands in UTF8SMTP was to try and keep the envelope and
header syntax reasonably similar. However the WG has decided to minimize
the differences from ASCII SMTP, which is probably the right decision. So
I would like another way of minimizing the differences between envelope
and header which fits this decision.

At the moment, the UTF-8 header draft specifies addresses like

	From: Tony Finch <[email-masked][email-masked]}>

Digression: A small nit: The spec allows whitespace within the {} but not
between the UTF8 domain and the { whereas the examples have no whitespace
inside the {} but do have whitespace where it isn't allowed.

I propose the following syntax, which keeps the primary UTF8 address and
the downgrade address separate (by analogy with the 821 layer), and which
only uses special characters for special purposes. {} are atext and so
should not be used for punctuation, so I am using [] instead.

	mailbox = (utf8-name-addr / utf8-addr-spec) [downgrade]
	downgrade = "[" ascii-addr-spec "]"

i.e. one of

	From: Tony Finch <[email-masked]> [[email-masked]]
	From: [email-masked] (Tony Finch) [[email-masked]]

The downgraded form could be

	mailbox = (name-addr / addr-spec) [downgrade-comment]
	downgrade-comment = "([" rfc2047-addr-spec "])"

where the latter part is the RFC 2047 encoding of the UTF8 address. The
([]) is a comment wrapping a [] bracketed address, so that it parses as a
comment but still has a distinctive form. For example,

	From: Tony Finch <[email-masked]> ([=?utf-8?q?d=F6t@dot=A4t.at])
	From: [email-masked] (Tony Finch) ([=?utf-8?q?d=F6t@dot=A4t.at])

This might get mangled into one of the following, which I think is OK.

	From: Tony Finch "[=?utf-8?q?d=F6t@dot=A4t.at]" <[email-masked]>
	From: [email-masked] (Tony Finch [=?utf-8?q?d=F6t@dot=A4t.at])

Note that this proposal makes the UTF8 header and downgraded ASCII header
forms look quite similar, and keeps the UTF8 email address easily
accessible.

Tony.
-- 
f.a.n.finch  <[email-masked]>  http://dotat.at/
FISHER: WEST OR NORTHWEST 4 OR 5 BECOMING VARIABLE 3 OR 4. FAIR. MODERATE OR
GOOD.

_______________________________________________
IMA mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ima

---

From: "Charles Lindsey" <[email-masked]>
Date: Tue, 22 Aug 2006 18:05:37 +0100

> 	From: [email-masked] (Tony Finch) [[email-masked]]

Having been on holiday for 10 days, and just seen this, I am surprised to  
find that there has been no response to this proposal on the list.

It seems to have some merit, insofar as it is a less drastic change to the  
present syntax, and it would seem to permit CFWS in more reasonable  
places. I certainly think it is worth looking at (especially, as we still  
have not really decided on a precise syntax for the current proposal).

> 	downgrade-comment = "([" rfc2047-addr-spec "])"

OTOH, I share the general dislike for putting meaningful stuff in comments  
(though my arm is twistable, and it may be the only way to get a utf-8  
'for' field in a Received header).

> 	From: [email-masked] (Tony Finch [=?utf-8?q?d=F6t@dot=A4t.at])

Do such manglings actually occur in meatspace? They seem pretty ugly to me.

-- 
Charles H. Lindsey ---------At Home, doing my own thing------------------------
Tel: +44 161 436 6131                       
   Web: http://www.cs.man.ac.uk/~chl
Email: [email-masked]      Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9      Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5