Skip to main content

minismtpd

Tests

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 asyncore and asynchat
  • Removed CLI
  • Removed DebuggingProxy and PureProxy classes
  • Removed the the decode_data constructor argument (always disabled)
  • Removed the the enable_SMTPUTF8 constructor argument (always enabled)
  • Added type annotations

Install

pip install minismtpd

Use

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:
    # Run until Ctrl-C
    server.serve_forever()

Metadata

Release files for minismtpd 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for minismtpd 0.2
File Interpreter ABI Platform
minismtpd-0.2-py3-none-any.whl Python 3 none any Details

Release files / minismtpd-0.2-py3-none-any.whl

Download URL minismtpd-0.2-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e69ce6596a6db64cf6ca046021f445d45918cebac52e6d35e60e5c2d760744f3
BLAKE2b-256 checksum
How to use checksums
f47d9e85593af139f589b624b2fff1aded35703ee0111d5cb6489dd993a406c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

0.3

1 release file

This release

0.2 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page