Maddy: A Complete Mail Server in One Binary
Maddy is an attempt to make running a mail server a reasonable thing to do.
What it replaces
A conventional self-hosted mail server is Postfix for SMTP, Dovecot for IMAP, OpenDKIM for signing, SpamAssassin or rspamd for filtering, and a database or passwd file for accounts. Five components, five configuration languages, and the integration between them is where everything goes wrong.
Maddy is one binary and one configuration file covering all of it.
$(hostname) = mail.example.com
$(primary_domain) = example.com
smtp tcp://0.0.0.0:25 {
deliver_to &local_mailboxes
}
Compare with Mailcow or Mail-in-a-Box, which take the opposite approach: orchestrate the traditional components so you do not have to. Both are valid. Maddy is less to understand; the bundles are more battle-tested and have more features.
The honest warning about self-hosted mail
Our self-hosted email post covers this properly and it bears repeating: receiving mail is hard, and being able to send mail that is accepted is harder.
You need correct reverse DNS, SPF, DKIM and DMARC, an IP with no history, and port 25 outbound, which most cloud providers block. Maddy makes the software straightforward and changes none of that.
If what you actually want is for a server to send you alerts, you do not want a mail server at all. Our msmtp guide covers relaying through an existing provider in ten minutes.
What Maddy does well
DKIM signing is built in and automatic rather than a separate daemon with its own key management.
TLS via ACME without an external renewal hook, per our Let’s Encrypt guide.
The configuration is comprehensible. For anyone who has debugged Postfix’s main.cf against Dovecot’s LDA, that is worth a great deal.
Operational caution
Mail is the one service where silent failure costs you most. Monitor delivery, watch the logs, and test from an external address regularly rather than assuming.
Back up the mailboxes, which are the irreplaceable part, per our backups guide.
License
Maddy is released under the GNU General Public License v3.