Best Self-Hosted Email Servers: Mail-in-a-Box vs Mailcow vs Stalwart
Running your own email server is one of the most rewarding self-hosting projects you can take on: it gives you full ownership of your data, an address on your own domain, and freedom from any third-party scanning or subscription. But it is also famously fiddly. The good news is that the modern open source crop has made it dramatically easier — and three projects now cover nearly every need, from a true one-click appliance to a Dockerised suite to a single memory-safe binary. Here is how Mail-in-a-Box, Mailcow and Stalwart Mail Server compare.
Mail-in-a-Box
Mail-in-a-Box takes the “it just works” approach further than anything else: a single installation script turns a fresh Ubuntu machine into a complete, hardened mail server. It is opinionated by design — one supported platform, one way of doing things — so there is almost nothing to assemble by hand.
Strengths
- One-click setup: a single script installs SMTP, IMAP, webmail, DNS automation and TLS on a fresh Ubuntu box.
- Automatic DNS & security: SPF, DKIM and DMARC records are created automatically; free Let’s Encrypt certificates are issued and renewed for you.
- Integrated webmail: a bundled modern webmail (Roundcube) for reading and sending mail from any browser.
- Built-in protection: greylisting, SpamAssassin and automatic blacklist updates, plus automated encrypted backups.
The latest release is v76 (May 2026), which fixed a Nextcloud break after a PHP update and repaired control-panel HTML. It is the best pick if you want a real mail server with the least possible effort, and its CC0-1.0 dedication puts the code in the public domain.
Mailcow
Mailcow is the mature Dockerised choice: it bundles Postfix, Dovecot, Rspamd and ClamAV together with SOGo webmail and a polished web admin UI, and ships as a set of Docker Compose services you can stand up on any Docker host. It has a large, active community and a well-trodden path from development box to production.
Strengths
- All-in-one Docker suite: Dovecot, Postfix, Rspamd and ClamAV in one deployment, managed via a friendly admin UI.
- Spam & virus filtering: Rspamd and ClamAV give you solid anti-spam and anti-malware out of the box.
- Auto-config: clients are set up automatically, and SOGo provides full webmail and groupware.
- Regular security releases: monthly-ish maintenance trains keep the stack current.
The latest release is 2026-09 (September 2026), shipping Unbound 1.26.1, SOGo 5.12.11 and Redis 7.4.11. If you are comfortable with Docker and want a complete, feature-rich suite you can keep extending, Mailcow is the standard pick.
Stalwart Mail Server
Stalwart Mail Server is the modern, minimalist option: a single memory-safe binary written in Rust that speaks every major mail protocol — SMTP, IMAP, JMAP, POP3, CalDAV, CardDAV and WebDAV — so one process replaces an entire Postfix + Dovecot + more stack. It is built for speed, security and easy automation.
Strengths
- All protocols in one: a single binary covers SMTP, IMAP, JMAP, POP3, CalDAV, CardDAV and WebDAV.
- Modern JMAP & push: JMAP support brings fast synchronisation and push notifications; v0.16 made every management action a JMAP object.
- Built-in security: MTA-STS, DANE and automatic TLS/ACME, plus built-in spam and malware filtering with Sieve rules.
- Infrastructure-as-code friendly: the new
stalwart-cli applyidempotently reconciles a declarative plan, slotting into Ansible, Terraform or NixOS. - Low resource use: memory-safe Rust with a genuinely readable configuration file.
The latest release is v0.16.17 (August 2026), and v0.16.10 reached the milestone of zero open bug reports while passing all 309 JMAP conformance tests. A 1.0.0 release is expected around October 2026. If you want a lean, modern server you can automate fully, Stalwart is hard to beat.
Side-by-side comparison
| Feature | Mail-in-a-Box | Mailcow | Stalwart |
|---|---|---|---|
| Deployment | Single script (Ubuntu) | Docker Compose | Single binary / Docker |
| Protocols | SMTP + IMAP + webmail | SMTP + IMAP + groupware | SMTP, IMAP, JMAP, POP3, CalDAV, CardDAV, WebDAV |
| Webmail | Roundcube (bundled) | SOGo (bundled) | Built-in WebUI |
| Spam filtering | SpamAssassin + greylisting | Rspamd + ClamAV | Built-in + Sieve rules |
| Automation | Fully automatic but opinionated | Admin UI + Docker | JMAP API + stalwart-cli apply |
| License | CC0-1.0 (public domain) | Open source (GNU GPL) | AGPL-3.0 |
| Latest release | v76 (May 2026) | 2026-09 (Sep 2026) | v0.16.17 (Aug 2026) |
Which should you choose?
Start with Mail-in-a-Box if you want the least possible setup and a trustworthy all-in-one box on a single Ubuntu server — perfect for an individual or small organisation that just wants their own mail running today.
Choose Mailcow if you are comfortable with Docker and want a full, mature suite with a friendly admin panel, rich groupware and a large community behind it.
Pick Stalwart if you value a modern, minimal, hyper-optimised server you can script and automate completely — ideal for a homelab, organisation or anyone who wants an entire mail stack in one process.
All three are free and open source, self-hosted on your own hardware, and let you own your email data outright. Read the full details on the Mail-in-a-Box, Mailcow and Stalwart listings, or browse hundreds more free and open source tools in the directory. Know a great mail server we’re missing? Suggest it and we’ll add it.