Mail-in-a-Box

Mail-in-a-Box

Mail-in-a-Box tries to make that a bit less painful. It’s not a mail client, and it’s not a dashboard on top of someone else’s hosting — it’s a full-stack, all-in-one mail system you install on a single Ubuntu server. One script sets up everything: Postfix, Dovecot, Nextcloud for file sync, a DNS server (optional), Let’s Encrypt certs, spam filtering, and a management UI.

OSUbuntu Server
Size20 GB
Versionv76

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 versionv76, released 24 May 2026
LicenceFree, open source (public domain)
Operating systemUbuntu 22.04 LTS, 64-bit, server edition — nothing else
Memory512 MB minimum, 1 GB recommended
Also requiredA 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

  1. Rent a small virtual server and install Ubuntu 22.04 LTS, 64-bit. Nothing else on it.
  2. 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.
  3. Open the ports the project lists: mail, DNS, web and management.
  4. Connect over SSH as root and run the installer from the project. It asks a few questions and does the rest.
  5. Open the control panel, create mailboxes, and work through the system status checks until everything is green.
  6. 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

ProblemWhat to do
Mail goes to spam at large providersCheck 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 updateA recurring issue tied to upstream changes; v76 fixed the most recent instance.
Registrar will not accept glue recordsDocumented as awkward at some registrars and for some domain endings.
Old box on an earlier UbuntuNo in-place upgrade — build a new box on 22.04 and migrate.
Changes to configuration files disappearBy design. The box manages its own configuration.

Mail-in-a-Box vs. alternatives

ToolHow it compares
MailcowDocker-based and far more configurable; you supply DNS yourself
iRedMailInstalls on your own server and can live alongside other services; paid support available
hMailServerThe Windows equivalent — free mail server, but webmail and DNS are your job
Postfix and Dovecot by handComplete 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.

Editor’s rating
4.5/ 5
Features 4 · Ease of use 4 · Free version 5 · Development 4
Scored by the ITDeptTools team on four criteria, 1–5 each.
Your rating of Mail-in-a-Box
Visitors: no ratings yet — be the first

Other articles

Submit your application