Skip to content

Instantly share code, notes, and snippets.

@bcoe
Created November 13, 2011 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcoe/1362671 to your computer and use it in GitHub Desktop.
Save bcoe/1362671 to your computer and use it in GitHub Desktop.
server.py
import asyncore
from secure_smtpd import SMTPServer, FakeCredentialValidator
class SSLSMTPServer(SMTPServer):
def __init__(self):
pass
def process_message(self, peer, mailfrom, rcpttos, message_data):
print message_data
def start(self):
SMTPServer.__init__(
self,
('0.0.0.0', 465),
None,
require_authentication=True,
ssl=True,
certfile='examples/server.crt',
keyfile='examples/server.key',
credential_validator=FakeCredentialValidator(),
debug=True
)
asyncore.loop()
server = SSLSMTPServer()
server.start()
@singlecookie
Copy link

how do
I create a chat room on here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment