[Top] [All Lists]

[ietf-smtp] How is EAI mail implemented ?

2021-06-15 12:32:59
This is sort of a followup to the discussion abut domain names in Received lines in EAI messages.

RFC 6531 describes a model where EAI mail is conceptually parallel to ASCII mail -- clients tag incoming EAI messages with SMTPUTF8 keywords, those EAI messages can only be relayed to servers that offer SMTPUTF8, and so forth. Having looked at a bunch of EAI mail software, nobody actually implements it that way.

Since all computers handle 8-bit bytes, mail software generally handles 8-bit data without doing anything special. You have to change the code that does DNS lookups to turn U-labels into A-labels, but that's about it.

On my system I turn addresses into A-labels on the way in, and back into U-labels on the way out (only if there is a UTF-8 local part) and handle all the local routing and deliveries with A-labels. But a lot of MTAs don't even do that, they just allow any IDN in the domain, and if you want the U-label and A-label versions of an address to deliver to the same place, you have to configure them both.

Nobody I've seen tags messages as EAI in their internal queues. On outgoing mail, they check on the fly to see if it's an EAI message: non-ASCII characters in the envelope or message headers (Exim doesn't even look at the headers, and says that's not a bug.) A lot of MTAs add the SMTPUTF8 MAIL FROM tag to all outgoing mail to servers that offer SMTPUTF8, because why not. I think they all notice if an EAI message is sent to a non-EAI server, and a few in that case do odd things like turning a UTF-8 local part into a MIME encoded word in the envelope.

This approach is a lot easier to code than trying to tag all the queued messages, and it can deliver more mail if, e.g., an incoming message has an ASCII bounce address and UTF-8 recipients but is relayed to an ASCII recipient, the relay doesn't need EAI.

When looking at IMAP and POP servers, again, since computers all handle 8-bit data, you get most of the way there for free. I haven't found any IMAP servers with UTF8=ACCEPT or POP with UTF8 that really works, but I've found plenty with LOGIN and AUTHENTICATE commands that take UTF-8 strings, and IMAP searches with the complex old character encoding work remarkably well. It often seems even to find strings in unencoded UTF-8 headers which I wasn't expecting, perhaps again something that works by mistake.

None of this means the RFCs have to change but it might be time for an applicability statement or something about how EAI is likely to coexist with ASCII mail for a long time.

John Levine, johnl(_at_)taugh(_dot_)com, Taughannock Networks, Trumansburg NY
Please consider the environment before reading this e-mail.

ietf-smtp mailing list