Lightweight, asynchronous SMTP libraries.
Project description
API Documentation and Manual
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. It is
tested for Python 3.6+.
Getting Started
Use a virtualenv to get started developing against python-slimta
:
$ 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 slimta
:
(.venv)$ pip install -r requirements-dev.txt
(.venv)$ py.test
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 1025
, 1465
and 1587
instead.
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
- A populated
examples/site_data.py
config file.
Check out the in-line documentation with --help
, and then run:
(.venv)$ ./slimta-mail.py
Manually or with a mail client, you should now be able to deliver messages. On
port 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
connection:
$ openssl s_client -host localhost -port 1587 -starttls smtp
Contributing
If you want to fix a bug or make a change, follow the fork pull request model. We've had quite a few awesome contributors over the years, and are always open to more.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python-slimta-5.0.5.tar.gz
.
File metadata
- Download URL: python-slimta-5.0.5.tar.gz
- Upload date:
- Size: 113.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6040b24206d1c87ea82d8078962cb491576c9d7822c0d7e53963b0537f21b146 |
|
MD5 | 1b7222464b540f80e81ee5e92540969b |
|
BLAKE2b-256 | 3105b02ff99732d3820b572f7a77bfc025fd43c6fd6152217c02501144711fd8 |
File details
Details for the file python_slimta-5.0.5-py2.py3-none-any.whl
.
File metadata
- Download URL: python_slimta-5.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 147.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4748fe1179fbc651701736823ad8c8d1bd011a5a40f77146a31a093c25c3a5a9 |
|
MD5 | 8d37416b1f8660e4c982dc90ed397aae |
|
BLAKE2b-256 | 31b5a91983fe4ea7bc3ae74617fb716e87bd02b5be3f771f5b96c17e4e7412e2 |