Skip to content

pombredanne/python-slimta

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


About

The python-slimta project is a Python library offering the building blocks necessary to create a full-featured MTA. Most MTAs must be configured, but an MTA built with python-slimta is coded. An MTA built with python-slimta can incorporate any protocol or policy, custom or built-in. An MTA built with python-slimta can integrate with other Python libraries and take advantage of Python's great community.

The python-slimta project is released under the MIT License.

Build Status

Getting Started

Use a virtualenv to get started developing against python-slimta:

$ cd python-slimta/
$ virtualenv .venv
$ source .venv/bin/activate
(.venv)$ python setup.py develop

To run the suite of unit tests included with slimta:

(.venv)$ pip install nose mox testfixtures
(.venv)$ nosetests

Running the Example

The example in examples/slimta-mail.py provides a fully functional mail server for inbound and outbound email. It needs several things to run:

  • An activated virtualenv as created above in Getting Started.

  • A TLS certificate and key file. The easiest way to generate one:

openssl req -x509 -nodes -subj '/CN=localhost' -newkey rsa:1024 -keyout cert.pem -out cert.pem
  • Superuser privileges at startup.

    The example starts services on ports 25, 587, and 465 by default, which are privileged ports on Linux machines.

  • A user and group to run as.

    Once the privileged ports are open, the example attempts to drop down to a non-privileged user and group for security purposes.

  • A populated examples/site_data.py config file.

Please see in the in-line example documentation by running:

(.venv)$ ./slimta-mail.py --help

About

Lightweight, asynchronous SMTP libraries

Resources

License

Stars

Watchers

Forks

Packages

No packages published