Skip to content
forked from aio-libs/aiosmtpd

A reimplementation of the Python stdlib smtpd.py based on asyncio.

Notifications You must be signed in to change notification settings

athoune/aiosmtpd

 
 

Repository files navigation

aiosmtpd - An asyncio based SMTP server

The Python standard library includes a basic SMTP server in the smtpd module, based on the old asynchronous libraries asyncore and asynchat. These modules are quite old and are definitely showing their age. asyncore and asynchat are difficult APIs to work with, understand, extend, and fix.

With the introduction of the asyncio module in Python 3.4, a much better way of doing asynchronous IO is now available. It seems obvious that an asyncio-based version of the SMTP and related protocols are needed for Python 3. This project brings together several highly experienced Python developers collaborating on this reimplementation.

This package provides such a implementation of both the SMTP and LMTP protocols.

Requirements

You need at least Python 3.4 to use this library. Python 3.3 might work if you install the standalone asyncio library, but this combination is untested.

License

aiosmtpd is released under the Apache License version 2.0.

Project details

As of 2016-07-14, aiosmtpd has been put under the aio-libs umbrella project and moved to GitHub.

The best way to contact the developers is through the GitHub links above.

Building

You can install this package in a virtual environment like so:

$ python3 -m venv /path/to/venv
$ source /path/to/venv/bin/activate
$ python setup.py install

This will give you a command line script called smtpd which implements the SMTP server. Use smtpd --help for details.

You will also have access to the aiosmtpd library, which you can use as a testing environment for your SMTP clients. See the documentation links above for details.

Developing

You'll need the tox tool to run the test suite for Python 3.4, 3.5, and 3.6. Once you've got that, run:

$ tox

After tox has built the virtual environments, you can run individual tests like this:

$ .tox/py35/bin/python -m nose2 -vv -P <pattern>

where <pattern> is a Python regular expression matching a test name.

Contents

.. toctree::
   :maxdepth: 2

   aiosmtpd/docs/intro
   aiosmtpd/docs/controller
   aiosmtpd/docs/mailbox
   aiosmtpd/docs/NEWS



Indices and tables

About

A reimplementation of the Python stdlib smtpd.py based on asyncio.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 94.1%
  • Makefile 5.9%