[UA-EAI] Seeking input UA-readiness of Open Source Code

Arnt Gulbrandsen arnt at gulbrandsen.priv.no
Mon Sep 2 13:47:13 UTC 2019


On Monday 2 September 2019 15:19:03 CEST, John Levine wrote:
>>>> ...
>>> That's a rather debatable assertion. ...
>
>> What does that mean for APIs?
>
> Look at the python smtp client module.  It does EAI and has a 
> new SMTPNotSupportedError which is thrown if you send an EAI 
> message and the server at the other end doesn't advertise 
> SMTPUTF8.

I looked, and SMTPNotSupportedError isn't EAI-specific. Adding EAI support 
to a python app doesn't require it, because it was already required.

> The smtpd module, an SMTP server, does EAI, and has a new 
> enable_SMTPUTF8 option.  It's deprecated in favor of the thready 
> aiosmtpd which also has a similar option.

I looked at it too, and if an application does nothing, it silently gets 
EAI support. Software will have to handle new errors, you said. There's no 
new error here and nothing the software actually will have to do. Software 
that upgrades to require aiosmtpd 3.7 gets EAI support with no change.

> The the email module which does header and MIME parsing and 
> deparsing has an email.policy submodule with a utf8 option that 
> says whether to put unencoded UTF-8 into headers or to MIME 
> encode it.

Yes. Still no new error handling required, still no new code path required 
of apps that use it. If an app doesn't add anything special, the users 
simply get generic error messages. "Unknown error while sending", "unable 
to send to <address>", that kind of thing.

Arnt


More information about the UA-EAI mailing list