Introduction
mr.hermes is an extension of the smtpd.DebuggingServer from the Python standard library. It dumps all mails it receives to the standard output and optionally to files in a configurable directory.
Usage
There are several ways to use this package. Probably the most two common are the following.
Command line
Install it with your preferred Python packaging tool (setuptools, distribute, pip or whatever). Run it from the command line using python -m smtpd -n -c mr.hermes.DebuggingServer localhost:8025.
If you want to dump the output to a directory, then set the DEBUG_SMTP_OUTPUT_PATH environment variable. For example like DEBUG_SMTP_OUTPUT_PATH=mails python -m smtpd -n -c mr.hermes.DebuggingServer localhost:8025.
Buildout
Add a part to your config like this:
[debugsmtp]
# Run a simple smtp server on 8025 that echos incoming email
recipe = zc.recipe.egg
eggs = mr.hermes
entry-points = debugsmtp=runpy:run_module
scripts = debugsmtp
host = localhost
port = 8025
path = ${buildout:directory}/var/mails
initialization =
import os
os.environ.setdefault('DEBUG_SMTP_OUTPUT_PATH', '${:path}')
sys.argv[1:] = ['-n', '-c', 'mr.hermes.DebuggingServer', '${:host}:${:port}']
arguments = 'smtpd', run_name='__main__', alter_sys=True
You can then add this script to something like supervisord and use mr.laforge to automatically start it when you need it.
Changelog
1.4.0 - 2017-11-08
Fixes for Python 3.6. [dokai (Kai Lautaportti), fschulze]
1.3.0 - 2016-12-06
Added *args and **kwargs in mr.hermes.DebugginServer.__init__ to accept the new (even if unused) parameters introduced in Python 3.3 and 3.4 and used when running the smtp module from cli. [duploduplo (Lorenzo Berni)]
1.2 - 2013-07-22
Make sure mails are sorted properly when filenames conflict. [dokai (Kai Lautaportti), fschulze]
1.1 - 2011-08-04
Fix packaging issue which basically made 1.0 a brownbag release. [fschulze]
1.0 - 2011-08-04
Initial release [fschulze (Florian Schulze)]
Metadata
Release files for mr.hermes 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mr.hermes-1.4.0.tar.gz | 4.1 kB | Without provenance | Details for mr.hermes-1.4.0.tar.gz |
Release files / mr.hermes-1.4.0.tar.gz
| Download URL | mr.hermes-1.4.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cd605101a696deeae435e846a11de3aa5af89b41fab39fe069c14264d857b7e
|
|
BLAKE2b-256 checksum How to use checksums |
8ab2e0f26b2332f7fa17c927afb01bb4d49aabda60487825f4b2b3a86a449258
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for mr.hermes 1.4.0
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.