Mail-in-a-Box turns a blank Ubuntu server into a complete mail system in about half an hour. You get SMTP, IMAP, webmail, contacts and calendars, spam filtering, automatic TLS certificates, backups and even authoritative DNS — configured for you, with the SPF, DKIM and DMARC records already correct.
It is free and open source, released into the public domain, and maintained by Joshua Tauberer with contributors. The current version is v76 (May 2026).
Mail-in-a-Box at a glance
| Latest version | v76, released 24 May 2026 |
|---|---|
| Licence | Free, open source (public domain) |
| Operating system | Ubuntu 22.04 LTS, 64-bit, server edition — nothing else |
| Memory | 512 MB minimum, 1 GB recommended |
| Also required | A registered domain and a machine dedicated entirely to this |
What it installs for you
- Postfix and Dovecot for SMTP, IMAP and POP, with per-user mailbox quotas.
- Roundcube webmail, so people can read mail in a browser.
- Nextcloud for contacts and calendars, synchronised to phones and desktop clients.
- Authoritative DNS for your domain, with SPF, DKIM, DMARC, MTA-STS and DNSSEC records generated automatically — the part people usually get wrong.
- Spam filtering with SpamAssassin and greylisting.
- Automatic TLS certificates from Let’s Encrypt, renewed without intervention.
- Backups, locally or to S3-compatible storage.
- A control panel with system status checks and a REST API, plus fail2ban and autoconfiguration for mail clients.
- Static website hosting through Nginx for your domains.
The conditions — read these first
The project is unusually direct about its limits, and ignoring them is the main way people get into trouble:
- It takes the whole machine. Installation must happen on a fresh server dedicated to Mail-in-a-Box. Not a container, not alongside your website.
- It is not configurable. The project’s stated goal is a working box, not a tunable one — there are almost no options, and hand edits to configuration files get overwritten on update.
- Ubuntu 22.04 only. Older boxes cannot be upgraded in place; you build a new machine and migrate.
- It takes over DNS for your domain, and the box’s hostname cannot be the same as your main website address.
- Not on a home connection. Residential providers block the mail port and their addresses are on blocklists.
- Deliverability is still not guaranteed. The records will be right; whether a large provider accepts your mail also depends on the reputation of your address block.
Installation in outline
- Rent a small virtual server and install Ubuntu 22.04 LTS, 64-bit. Nothing else on it.
- Point your domain’s glue records at the box and set reverse DNS on the IP address to match its hostname — ask the hosting provider for this.
- Open the ports the project lists: mail, DNS, web and management.
- Connect over SSH as root and run the installer from the project. It asks a few questions and does the rest.
- Open the control panel, create mailboxes, and work through the system status checks until everything is green.
- Send a test message to an external mailbox and check the headers to confirm SPF, DKIM and DMARC all pass.
Recent changes
- v76 — fixed Nextcloud breaking after a PHP update, and invalid markup in the control panel.
- v75 — Roundcube security update, fixed S3 backups to empty buckets.
- v74 — Roundcube security update, autoconfiguration and fail2ban fixes.
- v73 — per-user mailbox quotas in the control panel, backup status in system checks.
The pattern is worth noticing: most releases carry security updates for the bundled webmail. Running an out-of-date box means running out-of-date webmail exposed to the internet, so keep up with releases.
Common problems
| Problem | What to do |
|---|---|
| Mail goes to spam at large providers | Check reverse DNS matches the hostname and that the box is not on a residential or blocklisted address range. The other records are already correct. |
| Nextcloud broken after an update | A recurring issue tied to upstream changes; v76 fixed the most recent instance. |
| Registrar will not accept glue records | Documented as awkward at some registrars and for some domain endings. |
| Old box on an earlier Ubuntu | No in-place upgrade — build a new box on 22.04 and migrate. |
| Changes to configuration files disappear | By design. The box manages its own configuration. |
Mail-in-a-Box vs. alternatives
| Tool | How it compares |
|---|---|
| Mailcow | Docker-based and far more configurable; you supply DNS yourself |
| iRedMail | Installs on your own server and can live alongside other services; paid support available |
| hMailServer | The Windows equivalent — free mail server, but webmail and DNS are your job |
| Postfix and Dovecot by hand | Complete control, and every record and setting is yours to get right |
FAQ
Is Mail-in-a-Box free?
Yes, and it is public domain, so there are no restrictions on commercial use.
Can I install it on my existing web server?
No. It requires a fresh machine dedicated to it and will take over the system’s configuration.
Which Ubuntu version do I need?
Ubuntu 22.04 LTS, 64-bit, server edition. Other versions and distributions are not supported.
Can I run it at home?
Not realistically. Home connections block the mail port and their addresses sit on blocklists.
Can I change the configuration afterwards?
Barely. The project deliberately offers almost no options, and manual edits are overwritten.
Will my mail reach Gmail?
The required records are configured correctly out of the box, which is most of the battle. The rest depends on the reputation of your server’s address, which no software can guarantee.







