Metadata-Version: 2.4
Name: minismtpd
Version: 0.1
Summary: A minimal SMTP server
Author-email: Pēteris Caune <cuu508@monkeyseemonkeydo.lv>
Project-URL: Repository, https://github.com/cuu508/minismtpd.git
Project-URL: Issues, https://github.com/cuu508/minismtpd/issues
Keywords: smtp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# 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](https://docs.python.org/3/library/socketserver.html)
  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

## Usage Example

```python
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()
```
