OpenSMTPD
Secure, lightweight SMTP server implementation compliant with RFC 5321

OpenSMTPD is an open-source implementation of the server-side SMTP protocol (RFC 5321) originally developed as part of the OpenBSD project. It provides a minimal, security-focused mail transfer agent with a compact configuration model, extensible table backends and a filters API for mail processing.
Key Features
- Implements SMTP and common extensions with an emphasis on correctness and RFC compliance.
- Small, modular C daemon designed with privilege separation and process isolation to reduce attack surface.
- Declarative smtpd.conf with expressive match/action rules and built-in table support (examples in the codebase include passwd, sqlite and ldap table backends).
- Filters API and external filter/queue helpers allow integration of greylisting, DKIM signing, Rspamd, and other processing as separate components.
- Delivery options include maildir and mbox formats, an MDA helper, and LMTP client support for local delivery.
- TLS support via libtls/libressl with compatibility for OpenSSL builds, and per-listener TLS/cipher configuration options.
- Portable distribution and an "extras" set of table/filter modules allow packaging for non-OpenBSD systems while keeping the core minimal.
Use Cases
- Host SMTP for small organizations or single-host mail services that prioritize a small, auditable codebase.
- Deploy as a mail gateway/relay that enforces policy via filters and external scanners (spam, DKIM, greylisting).
- Integrate with system account stores or directory services using table backends (passwd, sqlite, LDAP) for virtual users and lookups.
Limitations and Considerations
- Advanced features such as DKIM signing, comprehensive anti-spam, or virus scanning are typically provided via external filters or proxies rather than baked into the core; administrators must deploy and configure filter components for those functions.
- Historical security advisories (patched in later releases) demonstrate the need to track upstream security fixes and apply updates promptly for exposed versions.
- The project prefers LibreSSL/libtls but supports OpenSSL; TLS behavior and available cipher/protocol features can vary depending on the TLS library used.
OpenSMTPD is a focused, security-oriented MTA that favors clarity and modularity. It is well suited for administrators who want a small, auditable mail server core and to assemble additional functionality via filters and table backends.
Categories:
Tags:
Tech Stack:
Similar Services

docker-mailserver
Containerized mail server stack for SMTP and IMAP with anti-spam
Production-ready mail server stack in a Docker container with SMTP, IMAP/POP3, LDAP auth, anti-spam/AV, DKIM/DMARC, and optional OAuth2 support.

Postal
Open source mail delivery platform for inbound and outbound email
Postal is an open source mail delivery platform for sending and receiving email, with SMTP support, web-based management, and tools for running your own SendGrid-style se...


Mail-in-a-Box
Turnkey email server with webmail, DNS, TLS, and admin panel
Mail-in-a-Box is a one-click mail server appliance for Ubuntu, bundling SMTP/IMAP, webmail, DNS, TLS automation, backups, and an admin control panel.

mailcow: dockerized
Docker-based email server suite with a web admin interface
Mailcow is a dockerized mail server suite providing SMTP/IMAP, webmail, anti-spam/anti-virus, and domain/mailbox administration via a unified web UI.

Stalwart Mail Server
All-in-one mail and collaboration server for modern and legacy protocols
All-in-one open-source mail and collaboration server with SMTP, IMAP, JMAP, CalDAV, CardDAV, and WebDAV, plus integrated anti-spam and phishing protection.

Mailu
Docker-based mail server with webmail and admin interface
Mailu is a full-featured mail server distributed as Docker images, providing SMTP/IMAP/POP3, webmail, administration UI, and built-in security and anti-spam features.
GNU Make
C