--- id: aiosmtpd version: "1.4.6" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aiosmtpd — aiosmtpd - asyncio based SMTP server License: permissive · Maintenance: active · Downloads: 1.9M/mo ## What it is and what it does aiosmtpd is an asyncio-based SMTP server implementation that replaces the synchronous smtpd module from Python's standard library. It allows you to build email servers and mail transport agents (MTAs) that can handle multiple concurrent SMTP connections without blocking. The package is built on asyncio, making it suitable for integration into async Python applications that need to receive, process, or relay email messages. The server implements SMTP and related MTA protocols, letting you define custom handlers for incoming mail. It runs on Windows, Linux, FreeBSD, and supports both CPython and PyPy across Python 3.8 through 3.12. With only two runtime dependencies (atpublic and attrs), it has minimal overhead and integrates cleanly into existing async codebases. Use it for: - Build a test SMTP server for development and integration testing of email-sending applications. - Implement a mail relay or gateway that receives SMTP connections and forwards messages to downstream systems. - Create a custom email processing pipeline that captures incoming messages for logging, filtering, or transformation. - Run a local SMTP listener for development environments to intercept and inspect outgoing mail without sending it. - Integrate email reception into an async web application or microservice architecture. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. aiosmtpd is an asyncio-based SMTP server that handles email message reception and routing, similar to the standard library's smtpd module but built for concurrent async workloads. Yes. aiosmtpd is actively maintained, permissively licensed, has low install friction, and fills a genuine gap for async SMTP server use cases. It's well-suited for testing, prototyping, and production email reception in async Python applications. No known vulnerabilities as of the fact sheet date. ## Install pip install aiosmtpd uv add aiosmtpd poetry add aiosmtpd ## Installing aiosmtpd Before you install: Low install friction with only two lightweight runtime dependencies (atpublic and attrs). The package is actively maintained with a recent commit as of 2026-08-12, supports Python 3.8 through 3.12, and has been in development since 2015-10-20. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most deployment scenarios. Quickstart: pip install aiosmtpd import asyncio from aiosmtpd.smtp import SMTP async def main(): smtp = SMTP() await smtp.handle_EHLO(None, None) asyncio.run(main()) Requires Python 3.8 or later; asyncio event loop must be available in the runtime environment. Verify before relying: - Whether the package includes built-in handlers for common mail delivery scenarios or requires custom handler implementation. - Performance characteristics under high concurrent connection loads. - Compatibility with modern mail client authentication schemes (SASL, TLS). ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags asyncio smtp server, async email server, smtp daemon python, email message handling, mta protocol server, concurrent smtp, python email relay, smtp-server, asyncio, email-handling [View on SkillFed](https://skillfed.io/packages/aiosmtpd) · [View on PyPI](https://pypi.org/project/aiosmtpd/)