Lightweight, asynchronous SMTP libraries.
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
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.
python-slimta project is released under the MIT License. It is
tested for Python 3.6+.
Use a virtualenv to get started developing against
$ cd python-slimta/
$ python3 -m venv .venv
$ source .venv/bin/activate
(.venv)$ pip install -U pip wheel setuptools
To run the suite of unit tests included with
(.venv)$ pip install -r requirements-dev.txt
Running the Example
The example in
examples/slimta-mail.py provides a
fully functional mail server for inbound and outbound email. To avoid needing
to run as superuser, the example uses ports
It needs several things to run:
virtualenvas 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
- A populated
Check out the in-line documentation with
--help, and then run:
Manually or with a mail client, you should now be able to deliver messages. On
1025, messages will go to unique files in the current directory. On port
1587, messages will be delivered to others using MX records! To try out a TLS
$ openssl s_client -host localhost -port 1587 -starttls smtp
Special thanks to JocelynDelalande for extensive work bringing Python 3 compatibility to the project!
The MIT License (MIT)
Copyright (c) 2021 Ian Good
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for python_slimta-5.0.5-py2.py3-none-any.whl