Author barry
Recipients Alex Grönholm, Elizacat, Frzk, alex.gronholm, asvetlov, barry, christian.heimes, gc, haypo, msornay, python-dev, siemer, sphawk, yselivanov
Date 2017-05-18.06:29:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495088981.04.0.130134474093.issue23749@psf.upfronthosting.co.za>
In-reply-to
Content
I'm very interested in this because, even though we do support STARTTLS in aiosmtpd, it's a hack using non-public symbols, and we have a hidden traceback!  (I.e. one that doesn't cause the test suite to fail, but only shows up when clients disconnect.)

Here's our STARTTLS implementation (at least as of this writing): 

https://github.com/aio-libs/aiosmtpd/blob/master/aiosmtpd/smtp.py#L361

And here's the bug description:

https://github.com/aio-libs/aiosmtpd/issues/83

We're getting eof_received() *after* connection_lost()!

And the "fix":

https://github.com/aio-libs/aiosmtpd/pull/101/files

Basically, once we flip the protocol to the SSLProtocol and then munge the transport, we have to keep the original transport around so that we can close that explicitly on connection_lost().

I don't really know whether this is 1) the right way to implement STARTTLS, and 2) to handle the traceback fix given the APIs we have to work with today (Python 3.4-3.6).  But that's the problem right? :)
History
Date User Action Args
2017-05-18 06:29:41barrysetrecipients: + barry, siemer, haypo, christian.heimes, asvetlov, alex.gronholm, python-dev, yselivanov, msornay, Elizacat, gc, sphawk, Alex Grönholm, Frzk
2017-05-18 06:29:41barrysetmessageid: <1495088981.04.0.130134474093.issue23749@psf.upfronthosting.co.za>
2017-05-18 06:29:41barrylinkissue23749 messages
2017-05-18 06:29:40barrycreate