7 Best Self-Hosted Email Servers in 2026 (Free & Open Source)

Mailcow, Mail-in-a-Box, Stalwart, Docker Mailserver, Modoboa, Mailu, and Mox compared. Install difficulty, RAM, deliverability, and the brutal truth about hosting your own email in 2026.

Published: 2026-04-30

Hosting your own email server in 2026 is harder than it was in 2010, and for one reason: the deliverability arms race has tilted hard toward big providers. New IPs default to untrusted by Gmail, Outlook, and Yahoo. SPF, DKIM, DMARC, ARC, and DNSBL checks all need to pass. Port 25 outbound is blocked by default on most cloud VPS, and unblocking it requires KYC.

If your goal is just "an inbox at my own domain," a managed provider (Fastmail, Migadu, ProtonMail) at $3 to $6 per user per month handles all of the above for you. Self-host email only when you have a real privacy or sovereignty reason, you enjoy running infrastructure, or you are at a scale where self-hosting is cheaper per seat. The seven servers below are the ones worth your time if you cleared that bar.

Quick comparison

ServerLicenseInstallMin RAMWebmail includedAdmin UIStack
MailcowGPL / Mailcow LicenseMedium4 GBYes (SOGo)YesDocker (15+ containers)
Mail-in-a-BoxCC0Easy2 GBYes (Roundcube)LimitedBash + apt on Ubuntu
StalwartAGPLMedium512 MBBuilt-in webmailYesSingle Rust binary
Docker MailserverMITHard1 GBNoNoSingle Docker image
ModoboaMITMedium2 GBYes (Roundcube)YesPython / Django
MailuMITMedium2 GBYes (Roundcube)YesDocker (split containers)
MoxMITEasy512 MBNoLimitedSingle Go binary

1. Mailcow

The most complete self-hosted email stack on the list. Docker-based, ships with Postfix, Dovecot, SOGo (webmail and groupware), Rspamd, ClamAV, and an admin panel that handles users, aliases, and quotas in one clean UI.

  • Install difficulty: medium. Docker Compose, a few DNS records, and you are up.

  • Hardware: 4 GB+ RAM recommended, 20 GB+ disk. Many containers run simultaneously.

  • Best for: small and mid-size teams who want a full Gmail/Workspace replacement with calendar and contacts.

Catch: it is heavy. ClamAV alone wants around 2 GB RAM. On a 2 GB VPS you will fight OOM kills before the first real user logs in.

Drop in on the Mailcow page for the full feature breakdown.

2. Mail-in-a-Box

The simplest full-stack mail server you can stand up. One bash script on a clean Ubuntu install gives you SMTP, IMAP, webmail (Roundcube), DNS hosting, and CalDAV/CardDAV in one shot.

  • Install difficulty: easy. Run the script, follow the prompts.

  • Hardware: 2 GB+ RAM, 10 GB+ disk.

  • Best for: solo users and very small teams who want one box that does everything.

Catch: it is opinionated. You get one server, one UI, one way of doing things. Tinkering with the configs breaks updates. Treat it like an appliance and it stays solid.

See Mail-in-a-Box on Talos Tools for the install steps.

3. Stalwart Mail Server

The 2026 dark horse. Rust-based, single binary, ships with SMTP, IMAP, JMAP, antispam, antivirus integration, full-text search, and an admin web UI. Comfortable in 512 MB RAM.

  • Install difficulty: medium. Single binary install plus DNS plus TLS. No Docker required.

  • Hardware: 512 MB+ RAM, scales linearly with mailbox count.

  • Best for: technical teams who want modern protocols (especially JMAP) and a small footprint.

Catch: younger than Mailcow. Documentation is improving fast, but the community is smaller when you hit edge cases. For most new self-hosters, Stalwart is the recommendation that ages best.

Stalwart Mail Server has the full app page with install notes.

4. Docker Mailserver

A minimal, production-ready mail server in one Docker image. Postfix, Dovecot, Rspamd, and Fail2ban, no webmail, no admin panel. Configuration is plain files on disk.

  • Install difficulty: medium-hard. CLI all the way. Bring your own webmail (Roundcube or SOGo) if you need one.

  • Hardware: 1 GB+ RAM, 10 GB+ disk.

  • Best for: sysadmins who want plain config files and no web UI in their threat model.

Catch: no GUI for user management. You add users via a CLI script. Comfortable if you live in a terminal, painful otherwise.

Inspect docker-mailserver for the container layout.

5. Modoboa

A Django-based mail platform that wraps Postfix and Dovecot in a friendly admin UI. Clean account management, quotas, aliases, calendars, and contacts (CalDAV/CardDAV).

  • Install difficulty: medium. Installer script handles most of the work on a clean Debian or Ubuntu host.

  • Hardware: 2 GB+ RAM.

  • Best for: teams who want Mailcow-style features but a lighter Python stack instead of Docker.

Catch: less polished than Mailcow's SOGo integration. The admin UI is functional, not flashy. Spam filtering tuning requires Postfix and Rspamd knowledge.

Modoboa on Talos Tools has the install path.

6. Mailu

A Docker-based mail stack that splits cleanly into Postfix, Dovecot, Rspamd, and an admin webui, each in its own container. Lighter than Mailcow, more web-managed than Docker Mailserver.

  • Install difficulty: medium. Docker Compose, plus a setup wizard that generates the config files for you.

  • Hardware: 2 GB+ RAM.

  • Best for: teams who want a balance between Mailcow's convenience and Docker Mailserver's minimalism.

Catch: smaller community than Mailcow. Some integrations (deep anti-spam tuning, custom auth) require Postfix and Rspamd familiarity.

See Mailu for the full stack overview.

7. Mox

A modern, Go-based mail server in a single binary. Implements SMTP, IMAP, ACME, DKIM/SPF/DMARC, MTA-STS, and DANE in one process. Active development, opinionated defaults that lean toward strict modern email standards.

  • Install difficulty: easy. Single binary, generated config, sane defaults out of the box.

  • Hardware: 512 MB+ RAM, low CPU.

  • Best for: solo operators who want strict modern email standards without manually wiring six services together.

Catch: no built-in webmail. Pair with Roundcube or SOGo. Less mature than Stalwart, but lower-level dependencies (just Go) and very fast initial setup.

Mox is the entry to look at next.

What you actually need before starting

Five prerequisites. Skip any one of them and your deliverability collapses.

  • A static public IP with clean reputation. Look up the IP at MXToolbox SuperTool, Spamhaus Zen, and Barracuda before you touch a config file. If it is on a blocklist, request a different IP or pick a different host.

  • PTR (reverse DNS) record matching your hostname. Most VPS providers expose this in a control panel. Without it, Gmail rejects you on first delivery.

  • Port 25 outbound unblocked. DigitalOcean, Linode, Vultr, Hetzner, OVH, and AWS all block port 25 outbound by default. You will file a support ticket, complete KYC, and explain your use case. This is non-negotiable.

  • DNS records set up: A, MX, SPF (TXT), DKIM (TXT), DMARC (TXT), and ideally MTA-STS and DANE/TLSA. Mail-in-a-Box generates the values for you. Mailcow, Mailu, and Stalwart give you the strings to paste into your DNS provider.

  • TLS certificate via Let's Encrypt or your provider. Stalwart and Mox handle ACME themselves. Mailcow and Mail-in-a-Box ship with it built in.

Plan a three to six week IP warmup period. Send small volumes of legitimate mail, monitor bounces, and increase volume gradually. Cold IPs that send 1,000 messages on day one go straight to spam, full stop.

FAQ

Can I run a mail server on a VPS?

Yes, but only if your provider unblocks port 25 outbound (most require KYC) and the IP has clean reputation. Hetzner, Mailcheap, and a handful of email-focused VPS providers are friendlier than DigitalOcean or Vultr for outbound mail use cases.

Why is port 25 blocked?

Because cloud VPS and residential IPs were the source of most spam in the 2010s. Blocking port 25 by default is the cheapest way for hosts to keep their entire IP range off blocklists. Once you prove you are legitimate, hosts unblock individual customers.

Do I need my own domain?

Yes. You cannot self-host email on a Gmail or Outlook subdomain. Buy a domain, point its MX records at your server, set up SPF/DKIM/DMARC.

Mailcow vs Mail-in-a-Box for beginners?

Mail-in-a-Box if you want one box, one UI, and zero Docker knowledge. Mailcow if you are comfortable with Docker Compose and want more flexibility long-term. Stalwart if you want the modern path with a small footprint.

Is Stalwart production-ready?

For small and medium deployments, yes. For 1,000+ user enterprise deployments, give it another year or run it alongside an established server until your team is comfortable.

What about plain Postfix or Exim?

They are battle-tested, but going that route means you are now on the hook for spam filtering, IMAP, webmail, antivirus, and admin tooling. Every server above wraps Postfix (or its own SMTP) plus those layers. Building it yourself is a multi-month project that few solo operators finish.

Where to go from here

For the rest of the self-hosted catalog, browse the self-hosted apps directory for password managers, cloud storage, calendars, and analytics. The previous deep-dive listicles for adjacent categories are useful neighbors: analytics, communication, and the rest of the Talos Tools blog.

If you are coming at this from a learning path, the DevOps roadmap and cybersecurity roadmap include the DNS, TLS, and email-auth fundamentals that make self-hosted email actually deliver.

Last updated: April 2026.

Last updated: 2026-05-05

Explore more on Talos.tools

  • Read more articles on the Talos blog
  • Free developer tools
  • Free Tailwind & HTML templates
  • Learning roadmaps