Bonzo is a Python SMTP Server using the asynchronous network library of Tornado. And it's actually a port of Python's smtpd module.
Here is a simple "Hello, world" example SMTP server for Bonzo:
import tornado.ioloop
import bonzo.smtp
class Handler(bonzo.smtp.RequestHandler):
def data(self):
print(self.request.message)
application = bonzo.smtp.Application(Handler)
if __name__ == '__main__':
application.listen(2525)
tornado.ioloop.IOLoop.current().start()
You can to use pip to install Bonzo:
$ pip install bonzo
Or using last source:
$ pip install git+https://github.com/puentesarrin/bonzo.git
Sphinx is needed to generate the documentation. Documentation can be generated by issuing the following commands:
$ cd docs
$ make html
Or simply:
$ python setup.py doc
Also, the current documentation can be found at ReadTheDocs.
Bonzo is available under the Apache License, Version 2.0.
Note
Logo credits: Image created by Freakofnurture (Wikimedia user), released into the public domain (source).