inpos 2016-05-30 14:44:56 +03:00
parent 568d49d644
commit 36b5f1971c
2 changed files with 12 additions and 1 deletions

View File

@ -1,7 +1,7 @@
from socketserver import StreamRequestHandler
ERR_CODE = {
220 : ''
220 : '',
500 : 'Syntax error, command unrecognized',
}

View File

@ -0,0 +1,11 @@
import socketserver
from .. import handler.smtp as h_smtp
class SmtpServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
# Ctrl-C will cleanly kill all spawned threads
daemon_threads = True
# much faster rebinding
allow_reuse_address = True
def __init__(self, server_address, RequestHandlerClass):
socketserver.TCPServer.__init__(self, server_address, RequestHandlerClass)