Maddy is a modular mail server that assembles a complete email system by connecting small, single-purpose modules through a declarative configuration file. Rather than a monolithic stack, it lets operators compose message processing, storage, authentication, and security enforcement from interchangeable building blocks, with each module handling a specific function like receiving SMTP connections, verifying credentials, or applying policy checks.
The server distinguishes itself through its flexible authentication and security architecture. It delegates user verification to external systems including Dovecot, LDAP, PAM, SQL databases, and remote IMAP servers via the SASL framework, while also supporting local password files and SQL-backed credential stores. Security enforcement is comprehensive, applying DKIM, SPF, DMARC, DANE, and MTA-STS checks to both inbound and outbound messages, with configurable actions for policy violations. TLS certificate management is fully automated through the ACME protocol, supporting DNS-01 challenges for domain validation without exposing a public HTTP endpoint.
Message handling follows a pipeline model where each incoming message passes through a configurable sequence of checks and delivery steps, with exit codes mapping to actions like accept, reject, or quarantine. Storage backends support SQLite, PostgreSQL, or CockroachDB for IMAP indexes and metadata, while message bodies can be stored in a filesystem or blob store with optional LZ4 or Zstd compression. The server handles multi-domain mailbox management with options for shared credentials, domain isolation, or unified mailboxes, and supports IMAP access with standard extensions including IDLE and MOVE.
Deployment options include Docker containers, prebuilt binaries, source compilation, and tarball installations, with DNS record publication for MX, SPF, DKIM, and DMARC. The server exposes an OpenMetrics endpoint for monitoring and supports integration with external tools like rspamd for spam filtering and milter-based mail filters.