Tooling

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)

Modern single-binary servers

Outbound-only (transactional sender, self-hosted)

Components (DIY stack)

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=quarantine after a month of p=none reports clean; then p=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).

On this page