How to Self-Host Email Securely (and Why Most Small Teams Shouldn't)

Published

Self-hosting email sits in a different category from self-hosting Nextcloud or a password manager. Get a self-hosted file sync server wrong and you lose some convenience. Get a self-hosted mail server wrong and your outgoing mail silently lands in everyone’s spam folder — or bounces outright — often without you noticing until a client says “I never got your invoice.”

Search intent

Someone searching this is weighing self-hosted email against a hosted provider and wants a realistic picture of the effort and risk involved before committing, not just a tutorial that assumes it’s a good idea.

Why email is harder to self-host than almost anything else

Running the mail server software is the easy part. The hard part is deliverability — getting other providers (Gmail, Microsoft 365, etc.) to trust mail from your server instead of dropping it in spam or refusing it outright:

  • IP reputation — a fresh IP address with no sending history is treated with suspicion by major providers. Residential and many cloud-provider IP ranges are pre-emptively distrusted or outright blacklisted for outbound mail.
  • Port 25 blocking — most residential ISPs and several cloud providers block outbound port 25 by default specifically to cut down on spam from compromised home machines, which means “just run Postfix on a box at home” often doesn’t work without provider-specific unblocking.
  • SPF, DKIM, and DMARC — DNS records that prove your server is authorized to send for your domain and that messages haven’t been tampered with. Misconfigured or missing records are one of the most common reasons self-hosted mail gets flagged as spam.
  • Blacklists — dozens of independent spam blacklists exist, and a single misconfigured server (or one compromised account sending spam) can get an IP added to one, tanking deliverability until you get delisted.

None of this is a one-time setup cost — it’s an ongoing maintenance burden. Reputation can degrade after the fact even if nothing changes on your end.

What you actually need to run it

If you’ve weighed the above and still want to self-host, the working parts are:

  • MTA (mail transfer agent) — Postfix is the standard choice for sending/receiving mail between servers.
  • IMAP/POP server — Dovecot, for actually storing and serving mailboxes to mail clients.
  • Spam/virus filtering — rspamd or SpamAssassin, plus something like ClamAV, sitting in front of inboxes.
  • Webmail (optional) — Roundcube or similar if you want browser-based access instead of only IMAP clients.
  • TLS everywhere — for SMTP submission, IMAP, and webmail alike; Let’s Encrypt covers the certificates.

Rather than wiring all of this together by hand, most people who go this route use an all-in-one bundle like Mailcow or Mail-in-a-Box, which packages Postfix, Dovecot, spam filtering, webmail, and a management UI into one Docker-based (Mailcow) or scripted (Mail-in-a-Box) install. This removes the integration work but not the deliverability and maintenance burden described above — you still own reputation management, DNS records, patching, and backups.

Security hardening checklist

If you self-host, treat this as the minimum, not the finish line:

  • Enforce TLS on submission (587) and IMAP, disable plaintext auth entirely
  • Set up SPF, DKIM, and DMARC correctly, and monitor DMARC reports for spoofing attempts against your domain
  • Run fail2ban (or equivalent) against SMTP/IMAP auth to block brute-force login attempts
  • Keep the MTA, spam filter, and OS patched — a mail server is a public-facing, high-value target
  • Back up mailboxes and configuration on the same schedule as any other production data — see the 3-2-1 backup approach
  • Monitor your sending IP against major blacklists on a recurring basis, not just when something breaks

When self-hosting email actually makes sense

  • You have a genuine data-sovereignty or compliance requirement that a hosted provider can’t satisfy
  • Mail volume is small and mostly internal, so the deliverability stakes of a bad day are low
  • You’re doing it to learn the stack, and business-critical mail lives elsewhere

When it doesn’t

  • Your business depends on customer-facing email actually arriving (invoices, quotes, support) — deliverability risk directly costs you money and trust
  • You don’t have the time to babysit blacklist status, DNS records, and patching indefinitely
  • You’re a small team without dedicated IT support to respond when deliverability breaks

For most small businesses, a hosted business email provider (Google Workspace, Microsoft 365, or smaller privacy-focused providers like Migadu or Fastmail) is the more realistic default: they carry the IP reputation and deliverability infrastructure at scale, so mail actually arrives, and you’re paying for that reliability rather than building it yourself. [NEEDS VERIFICATION: current pricing/plan details for any specific provider before naming numbers — not included here since they change frequently]

Decision checklist

QuestionLeans self-hostedLeans hosted
Compliance/data-sovereignty requirement?YesNo
Customer-facing deliverability matters?NoYes
Dedicated time for ongoing maintenance?YesNo
Primarily internal, low-volume mail?YesNo
Team already comfortable with Postfix/DNS debugging?YesNo

If you’re standardizing support requests instead of routing them through a shared inbox, see Zammad vs FreeScout vs Zendesk for self-hosted vs. hosted helpdesk options that sit on top of (or replace) a plain email inbox.

If “hosted email” is the answer, Google Workspace vs Microsoft 365 vs Zoho Workplace compares the three mainstream providers on price and features.

Bottom line

Self-hosting email is one of the few homelab/small-business self-hosting projects where “it works” and “it’s actually reliable for other people to email you” are two different bars, and clearing the second one is a recurring job, not a one-time setup. It’s a legitimate choice for internal, low-stakes, or compliance-driven use cases — but for a small business that needs customer mail to just arrive, hosted email is the boring, correct answer for most teams.