Author r.david.murray
Recipients barry, brett.cannon, eric.smith, r.david.murray, rhettinger, terry.reedy, vstinner
Date 2015-09-28.00:28:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443400094.57.0.00802293185928.issue25008@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a proof of concept port of smtpd to asyncio.  Obviously I'm not suggesting we commit this patch (it isn't complete...the tests don't run).  Instead I'm posting it as an outgrowth the of the sprint that was conducted today.  The DC team took a different tack, so I'm not submitting this as a patch to their repo, and since it is useful to look at the diff against default, it seems appropriate to post it here.

The advantage of this port is that it uses the existing smtpd protocol code, which is the "field tested" code.  Of course, I did have to change how the data is turned from bytes into lines, so I may have introduced some bugs.

As discussed, *using* an asyncio based smtpd has a different calling API than using the asynchat one.  However, the *pattern* is similar, so it may not be crazy to replace smtpd with the cleaned up version of this patch, exactly because the number of places this is used is relatively small and mostly in test code.  IMO it's a better option than deleting smtpd from the stdlib.

The code as is can be run using its CLI.  I tested it via telnet using the DebuggingServer and hand coding an email...for some reason I can't currently import smtplib (Enum errors in socket), so I didn't test it with smtplib, but it should work.
History
Date User Action Args
2015-09-28 00:28:15r.david.murraysetrecipients: + r.david.murray, barry, brett.cannon, rhettinger, terry.reedy, vstinner, eric.smith
2015-09-28 00:28:14r.david.murraysetmessageid: <1443400094.57.0.00802293185928.issue25008@psf.upfronthosting.co.za>
2015-09-28 00:28:14r.david.murraylinkissue25008 messages
2015-09-28 00:28:13r.david.murraycreate