Self-Hosted Email Servers
Mailcow, Mail-in-a-Box, Mailu, Stalwart, Maddy — run your own SMTP / IMAP / JMAP stack.
The hardest "useful self-hosted thing" to do well — deliverability, spam filtering, DNS hygiene, all on you. The Email page covers transactional senders (Resend / Postmark / SES); this page is for "I want to own the entire mail stack." If you don't have a strong reason, use a managed sender — but if you do, these are the tools.
Bundled stacks (the realistic option)
- ★ Mailcow: dockerized — Postfix + Dovecot + Rspamd + SOGo, all Compose-orchestrated, sane defaults, web admin UI. The default in 2026 for "I want a working mail server in an afternoon."
- ★ Mail-in-a-Box — single-script Ubuntu installer; Postfix + Dovecot + Roundcube + Z-Push + Nextcloud Calendar/Contacts. Opinionated, "no choices to make." Great for a personal domain.
- ★ Mailu — Compose-based; modular; lighter than Mailcow; admin UI; supports cluster mode.
- Modoboa — Django admin UI on top of Postfix / Dovecot / Rspamd / Radicale.
- iRedMail — long-running scripted installer; community + paid Pro.
- Poste.io — single-container all-in-one; closed-source admin, free + paid tiers.
Modern single-binary servers
- ★ Stalwart Mail Server — Rust; SMTP + IMAP + JMAP + spam filter + admin UI in one binary. Modern protocol support (JMAP, MTA-STS, MTA-Hooks). Rising fast. Excellent docs.
- ★ Maddy — Go; single binary; SMTP + IMAP; minimal config. The "small team mail server" pick.
- WildDuck — Node; HTTP / IMAP / POP3 / LMTP; Mongo-backed; HA-friendly; Zone-MTA pairs with it for outbound.
Outbound-only (transactional sender, self-hosted)
- ★ Postal — full mail server with focus on transactional sending; Mailgun-shape API; tracking; webhooks.
- Cuttlefish — Ruby outbound mail server; small.
- Halon MTA — closed-source commercial; outbound only at scale.
Components (DIY stack)
- Postfix — the SMTP MTA. Mature, documented to death.
- Dovecot — IMAP / POP3 server.
- Rspamd — modern spam filter; Lua-based; faster + better than SpamAssassin.
- OpenDKIM / OpenDMARC — DKIM signing + DMARC enforcement.
- Roundcube — webmail; PHP; the long-running default.
- SOGo — webmail + CalDAV / CardDAV; Mailcow uses this by default.
- Snappymail — Roundcube-shape modern alternative.
Deliverability essentials
- ★ SPF / DKIM / DMARC — set these correctly or your mail goes to spam. Mailcow / Mail-in-a-Box / Stalwart configure them automatically.
- ★ Reverse DNS (PTR) — your IP must resolve to a name that resolves back. Required by Gmail / Outlook.
- Warm-up the IP — ramp slowly; sending 10k cold = blocked.
- Don't run mail on a residential IP. Most ISPs block port 25; even if not, you're on every blocklist already.
- Postmaster Tools (Google) + Microsoft SNDS — feedback loops; sign up.
- MTA-STS + TLS-RPT + DANE — modern transport security; Stalwart and Mailcow support.
- MailTester.com, mail-tester.com, dmarcian — sanity-check before pointing real mail at the server.
Honest reality check
- Outbound to Gmail / Outlook is the hard problem. Even with everything correct, expect intermittent deliverability issues for the first months.
- Smarthost via SES / Postmark / Mailgun is the pragmatic compromise — your server handles inbound + storage; SaaS handles the last hop. Mailcow / Stalwart support this in one config knob.
- Backup MX or grey-listing — your inbox is single-server. Plan for it.
Patterns to adopt
- ★ Use a bundled stack, not raw Postfix. Mailcow or Mail-in-a-Box save weeks.
- Smarthost outbound through Postmark / SES if deliverability matters more than purity.
- Hetzner / OVH / Scaleway — cloud providers that don't block port 25 and aren't on blocklists.
- DKIM key rotation — annual.
- DMARC
p=quarantineafter a month ofp=nonereports clean; thenp=reject. - Fail2ban / Crowdsec in front — brute-force IMAP login attempts will start day one.
- Backup
/var/vmail+ the DB + the DKIM keys. All three are needed for restore.
Pick this if…
- Default for "personal domain mail": Mail-in-a-Box.
- Default for "small business mail": Mailcow.
- Modular Compose stack: Mailu.
- Modern protocol fan / single binary: Stalwart Mail Server.
- Tiny / Go-based: Maddy.
- Outbound-only transactional sender: Postal.
- Just want webmail in front of an existing IMAP: Roundcube or Snappymail.
- Don't want to do this yourself: Fastmail, Migadu, Purelymail, ProtonMail (managed alternatives).