[UA-EAI] Seeking input UA-readiness of Open Source Code
Arnt Gulbrandsen
arnt at gulbrandsen.priv.no
Mon Sep 2 15:20:11 UTC 2019
On Monday 2 September 2019 16:38:46 CEST, John Levine wrote:
> On Mon, 2 Sep 2019, Arnt Gulbrandsen wrote:
>>>> ...
>>> 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.
>
> EAI raises that error in routines that never raised it before.
> I'd say that's an API change.
SMTPNotSupportedException is a subclass of SMTPException, which is raised
for any SMTP-related. The method your have in mind has always raised
SMTPException if the server refuses to relay to a given recipient. Old code
that handles SMTPException gets SMTPNotSupportedException for free, it's
just that it'll handle the proplem generically, not specifically, so it may
report "remote server won't relay to ∀@example.org" when the actual problem
is that the server has no SMTPUTF8 support.
>> I looked at it too, and if an application does nothing, it
>> silently gets EAI support.
>
> I looked at it, and if you don't say enable_SMTPUTF8=True it
> doesn't advertise SMTPUTF8 and you don't get EAI support. Look
> again.
https://aiosmtpd.readthedocs.io/en/latest/aiosmtpd/docs/controller.html#enabling-smtputf8
The first sentence is the key. ("SMTP" is a legacy class, the recommended
way is Controller nowadays.) I checked the actual code, and it matches the
documentation.
I love the wording BTW: "It’s very common to want to enable the SMTPUTF8
ESMTP option, therefore this is the default". Way to go.
> Well, yeah but they don't get EAI support either if they don't
> set the utf8 option. IF you want EAI you have to change the
> client.
>
> I'm not saying any of these changes are a big deal, but they're
> more than zero.
And I'm saying that if an application doesn't do any of them, then EAI has
a nontrivial chance of working anyway. After a fashion.
So the survey needs to take a position on software that contains no
source-code-visible changes but may support EAI addresses anyway. How to
find, how to classify. Whether to include. What to do about software that's
intended to support EAI but contains no source-code-visible changes.
Arnt
More information about the UA-EAI
mailing list