Introduction
Maddy is a single-binary email server written in Go that handles SMTP sending, SMTP receiving, and IMAP mailbox access in one unified process. It replaces the traditional stack of Postfix, Dovecot, OpenDKIM, and SpamAssassin with a single composable configuration file, making self-hosted email dramatically simpler to deploy and maintain.
What Maddy Does
- Receives incoming email via SMTP with TLS, SPF, DKIM, and DMARC verification
- Sends outgoing email with automatic DKIM signing and queue management
- Serves mailboxes over IMAP for client access
- Provides built-in spam filtering with DNSBL and header checks
- Manages user accounts and credentials with a built-in database or PAM
Architecture Overview
Maddy is structured as a pipeline of composable modules defined in a single configuration file. Incoming messages flow through check modules (SPF, DKIM, DMARC, DNSBL), then routing rules, and finally storage targets. The IMAP server reads from the same storage backend. All components run in a single Go process with no external dependencies beyond a DNS resolver and optional database. Storage backends include the built-in SQLite-based store or IMAP proxy mode.
Self-Hosting & Configuration
- Deploy as a single binary or systemd service with the bundled config template
- Set DNS records for MX, SPF, DKIM, and DMARC following the setup guide
- Configure TLS certificates via ACME (Let's Encrypt) or manual paths
- Create user accounts with the
maddyctlcommand-line utility - Customize spam filtering thresholds and DNSBL providers in the config file
Key Features
- Single-binary deployment with no external daemon dependencies
- Composable configuration with modular check, modify, and deliver pipelines
- Built-in ACME support for automatic TLS certificate management
- Native DKIM signing and verification without external tools
- Lightweight resource footprint suitable for small VPS deployments
Comparison with Similar Tools
- Postfix + Dovecot — industry standard but complex multi-daemon setup; Maddy is a single binary
- Mail-in-a-Box — automated installer for traditional stack; Maddy is a ground-up reimplementation
- Mailu — Docker-based email suite; Maddy runs without containers
- iRedMail — Ansible-driven setup of traditional components; Maddy needs no orchestration
- Stalwart Mail — similar all-in-one approach with JMAP support; Maddy focuses on simplicity
FAQ
Q: Can Maddy handle high email volumes? A: Maddy is designed for personal and small-organization use. It handles typical volumes well but is not built for high-throughput transactional email.
Q: Does Maddy support aliases and catch-all addresses? A: Yes. Aliases and catch-all rules are configured in the routing section of the config file.
Q: What IMAP clients work with Maddy? A: Any standard IMAP client works, including Thunderbird, Apple Mail, K-9 Mail, and FairEmail.
Q: How do I migrate from an existing mail server?
A: Use imapsync or similar tools to move mailboxes from your old IMAP server to Maddy.