minismtpd
License
This library is based on now-discontinued smtpd module from the Python 3.11 standard
library. The original module and its tests are licensed under Python Software
Foundation License Version 2.
The modifications and new code is licensed under the BSD-3-Clause license.
Modifications
- Updated to run using socketserver
instead of
asyncoreandasynchat - Removed CLI
- Removed DebuggingProxy and PureProxy classes
- Removed the
decode_dataconstructor argument (always disabled) - Removed the
enable_SMTPUTF8constructor argument (always enabled) - Added type annotations
Install
pip install minismtpd
Use
import signal
from minismtpd import SMTPServer
class MyServer(SMTPServer):
def process_message(self, peer, mailfrom, rcpttos, data):
print(f"Peer: {peer}")
print(f"Mail from: {mailfrom}")
print(f"Rcpt To: {rcpttos}")
print(f"Data: {data}")
with MyServer(("localhost", 2525)) as server:
print("Listening on localhost:2525 ...")
def on_signal(signum, frame):
print("Shutting down...")
server.shutdown()
# Run until Ctrl-C
signal.signal(signal.SIGINT, on_signal)
server.serve_forever()
Metadata
Release files for minismtpd 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| minismtpd-0.4-py3-none-any.whl | Python 3 | none | any | Details for minismtpd-0.4-py3-none-any.whl |
Release files / minismtpd-0.4-py3-none-any.whl
| Download URL | minismtpd-0.4-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f2247065b81e760a926aa74662829b1bd83ba1fb710bbea483a35cd07b028e1
|
|
BLAKE2b-256 checksum How to use checksums |
ed03277b79a21cbd9e73b33a57a45b97088ec01ed852df4f4c6189d86784b35c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for minismtpd 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.