Skip to main content

Simple SMTP Server for debugging

Project description

dsmptd: A debugger SMTP server for Humans

dsmtpd is a small tool to help the developer without an smtp server

Usage

$ dsmtpd -p 1025 -i 127.0.0.1
2013-01-13 14:00:07,346 INFO: Starting SMTP server at 127.0.0.1:1025

Installation

For the installation, we recommend to use a virtualenv, it’s the easy way if you want to discover this package:

virtualenv ~/.envs/dsmtpd
source ~/.envs/dsmtpd/bin/activate

pip install dsmtpd

Documentation

Execute dsmtpd with the –help flag and you will get the usage of this command:

dsmtpd --help

There are three options:

  • -p You specify the port of dsmtpd (default is 1025)

  • -i You specify the network interface (default is loopback, 127.0.0.1)

  • -d You specify a Maildir directory to save the incoming emails

Use it

Here is a small example:

dsmtpd

swaks --from stephane@wirtel.be --to foo@bar.com  --server localhost --port 1025

Exit Codes

dsmtpd uses specific exit codes to indicate the result of its execution.

Code

Meaning

Example

0

Success

Normal shutdown (e.g. user pressed Ctrl+C) or clean termination.

2

Invalid Maildir directory

The given path exists but does not contain the required subfolders: tmp, new, and cur.

Contributing

git clone git://github.com/matrixise/dsmtpd.git

Copyright 2013 (c) by Stephane Wirtel

dsmtpd Changelog

Here you can see the full list of changes between each dsmtpd release.

Version 1.1

Released on September 13th 2025.

  • Lower Python version requirement from 3.12 to 3.10 (#17)

  • Fix crash when directory exists but is not yet a valid Maildir with proper validation and repair functionality (#18)

  • Add exit codes documentation to README

  • Code formatting improvements with ruff

Version 1.0

Release on May 20th 2025.

  • Migration to aiosmtpd to Support Python >= 3.12 (#11, patch by Sebastian Wagner)

  • Add minimal tests for maildir check and importability

  • Add systemd service file (by Sebastian Wagner)

Version 0.3

Release on May 26th 2021.

  • Maildir capture: added early check (patch by Bernhard E. Reiter)

  • Remove the support of Docopt

  • Remove the support of Python 2.x (dead in 2020)

  • Support Python 3.6+

  • Improve the classifiers for PyPI

  • Migrate to PEP 517

  • Fix License into setup.py

  • Add tests for the CLI using argparse instead of docopt

Version 0.2

Release on January 21st 2013.

  • Allow to store the incoming emails in a maildir via the ‘-d’ argument

Version 0.1

Release on January 14th 2013.

  • Implement a basic server

  • Show the message in the log

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dsmtpd-1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dsmtpd-1.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file dsmtpd-1.1.tar.gz.

File metadata

  • Download URL: dsmtpd-1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for dsmtpd-1.1.tar.gz
Algorithm Hash digest
SHA256 4756f3659d75e29d814f6998d1c9cae9656dd403372bbb8fa53d90e8ebd8bdf3
MD5 cd74b3cb5e96e0130514edffe72b4365
BLAKE2b-256 73f04cfd58f47e4841fa3a629e44c6a2214bad5f7d8902b9dea1a0cf361f8d31

See more details on using hashes here.

File details

Details for the file dsmtpd-1.1-py3-none-any.whl.

File metadata

  • Download URL: dsmtpd-1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for dsmtpd-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1da37e31d3693ac056532905234729409d0f576362c096c6c5808b8192848d09
MD5 749c7081fe02716a53b9ed9712c1a157
BLAKE2b-256 e253f721f92f6094dff5be6649d8107b51ef30c5cc9a8fa90932044f052d8d8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page