[Python-Dev] Is thread-safe smtpd desired/possible?

Sorin Stelian sorin.stelian at axis.com
Tue May 21 18:50:23 CEST 2013


Hi,

I am posting this here since I could find no active maintainer of the smtpd module.

In my work as a test engineer for Axis (www.axis.com) I encountered the need of having thread-safe SMTP servers. I know the use case of several SMTP servers running in concurrent threads might seem odd, but it can actually be quite useful for testing purposes.

I have implemented (for my own use) a possible solution which basically means that every SMTP channel has its own socket map, instead of using asyncore's global socket map. It would not involve any change in asyncore.

Looking at the disucssion from http://bugs.python.org/issue11959 it seems to me that such a solution would not be accepted. Do you think that modifying asyncore is more feasible? If not, is this something that might be looked at?

I can provide code if needed, but I would first like to know your thoughts about this.

Best regards,
Sorin


More information about the Python-Dev mailing list