Self-hosted email has a reputation for being more trouble than it’s worth, and for a lot of businesses that reputation is earned — badly configured mail servers are a magnet for spam, blacklisting, and deliverability problems. But for a business that wants full control of its mail data, no per-seat SaaS licensing, and the ability to run mail alongside its other infrastructure, a well-run self-hosted stack is a legitimate option. We run production business email this way on Mailcow, a Dockerized open-source mail suite, and here’s what actually goes into keeping it reliable.
Why self-host at all
The honest case for self-hosting isn’t “it’s free” — running it properly costs real engineering time, which has to be weighed against a SaaS mailbox subscription. The real reasons are control and ownership: your mail data stays on infrastructure you control, you’re not subject to a vendor’s account suspension policies or per-mailbox pricing creep, and you can integrate mail with everything else you run — internal tooling, automation, monitoring — without going through a third party’s API limits. If none of that matters to your business, a managed mailbox provider is probably the right call. If it does, self-hosting is viable — but only with the operational discipline below.
The non-negotiables
SPF, DKIM, and DMARC, set up correctly from day one. SPF declares which servers are allowed to send mail for your domain. DKIM cryptographically signs outgoing mail so receivers can verify it wasn’t altered in transit. DMARC ties the two together and tells receiving servers what to do when a message fails both checks — and, critically, gives you visibility into who’s sending mail claiming to be from your domain, including anyone spoofing it.
The part people get wrong is going straight to a hard-reject DMARC policy on day one. Don’t. The correct rollout is staged:
- Start at
p=quarantine(or evenp=none, monitor-only) with a low enforcement percentage —pct=25is a reasonable starting point. - Point the aggregate report address (
rua=) at a mailbox you actually read, and watch the reports for a couple of weeks. This is where you catch legitimate mail streams — a CRM, a billing tool, a marketing platform — that aren’t yet aligned with SPF/DKIM before you start blocking them. - Once the reports come back clean — every legitimate source passing alignment — raise
pctin stages: 25 → 50 → 100, giving each stage time to confirm nothing breaks. - Only move from
quarantinetorejectonce you’ve run atpct=100quarantine cleanly for a couple of weeks.
Jumping straight to p=reject; pct=100 before you’ve verified every legitimate sending source is correctly aligned is the single most common way self-hosted (and SaaS) email setups accidentally blackhole their own mail.
Brute-force protection on every exposed service. IMAP, SMTP auth, and the webmail/admin login are all internet-facing by necessity, which makes them a constant target for credential-stuffing attempts. A fail2ban-style layer that watches auth logs and temporarily bans repeat offenders is not optional — it’s the difference between background noise in your logs and an account actually getting brute-forced. Check periodically that it’s actually running and actually banning, not just installed; a protection mechanism that silently stopped working months ago is worse than none, because it creates false confidence.
Spam filtering that’s actually tuned, not just installed. Mailcow ships with rspamd, which does a good job out of the box, but it benefits from attention: reviewing what’s landing in quarantine versus the inbox, feeding back false positives and negatives, and keeping its rule sets updated. An under-tuned spam filter either lets through what your users have to manually block, or — worse — quietly drops legitimate mail that users never see and never know they’re missing.
Automated TLS renewal, verified, not assumed. ACME-based certificate renewal (Let’s Encrypt or similar) should be fully automated for every mail-related hostname — the mail server itself, autodiscover/autoconfig, and the MTA-STS policy host if you’re running one. “Automated” still needs a periodic check that it’s actually succeeding; a renewal job that’s been silently failing for two months and hasn’t been noticed is a self-inflicted outage waiting for the exact day the old cert expires.
Queue monitoring. A healthy mail queue is empty or draining. A queue that’s growing means something downstream is rejecting or deferring your mail — a blacklist hit, a misconfigured relay, a receiving server rate-limiting you — and it’s far easier to catch and fix at “the queue has a few hundred messages backing up” than at “customers have been telling us for three days that our invoices never arrive.”
Routine update discipline. Mailcow moves fairly quickly as a project, and a Docker-based stack makes staying current mechanically easy — pull the new images, bring the stack back up, verify the services come back healthy. The discipline part is doing it on a schedule rather than only when something breaks, since mail server CVEs are exactly the kind of thing that gets actively exploited once they’re public.
The takeaway
None of this is exotic infrastructure work — it’s the same operational rigor you’d want from any internet-facing service that holds something as sensitive as a company’s email. The businesses that run self-hosted mail successfully are the ones that treat it as a service with an on-call discipline, not a box that gets set up once and forgotten. The ones that end up migrating back to a SaaS provider are usually the ones that skipped the monitoring and the staged DMARC rollout and found out the hard way.