Mail-in-a-Box

Mail-in-a-Box – Self-Hosted Email That Doesn’t Eat Your Weekend What is Mail-in-a-Box Running your own mail server used to be a nightmare — DNS records, spam filters, TLS configs, weird failures at 3 a.m. Mail-in-a-Box tries to take that pain and bury it under automation. You spin up a clean Ubuntu box, run a single command, and in ten minutes you’ve got a working mail system with webmail, DNS, spam filtering, encryption — the works.

It’s not a fancy mail platform. It’s not for massive corporat

OS: Windows / Linux / macOS
Size: 51 MB
Version: 73
🡣: 14,824 stars

Mail-in-a-Box – Self-Hosted Email That Doesn’t Eat Your Weekend

What is Mail-in-a-Box

Running your own mail server used to be a nightmare — DNS records, spam filters, TLS configs, weird failures at 3 a.m. Mail-in-a-Box tries to take that pain and bury it under automation. You spin up a clean Ubuntu box, run a single command, and in ten minutes you’ve got a working mail system with webmail, DNS, spam filtering, encryption — the works.

It’s not a fancy mail platform. It’s not for massive corporate rollouts. What it is, though, is everything you need to run email for a domain — in one place, with sensible defaults, hardened security, and no need to dig through 20-year-old Postfix documentation.

Perfect for small orgs, side projects, dev teams, or anyone tired of renting mailbox space from big vendors.

Why It’s Practical

Component What It Covers
Postfix + Dovecot Sending, receiving, and storing mail (SMTP/IMAP)
SpamAssassin + ClamAV Spam filtering and virus scanning
Roundcube Browser-based webmail
DNS (NSD) Authoritative DNS server with auto DNS zone setup
Let’s Encrypt TLS certificates with auto-renewal
DKIM, SPF, DMARC Proper email authentication out of the box
Nextcloud (optional) Contacts and calendar sync (CardDAV/CalDAV)
Backup system Daily encrypted snapshots, stored locally

Installing It (Reality Version)

Clean Ubuntu 22.04. Nothing else. No pre-installed Postfix, no Docker, no surprises.

curl -s https://mailinabox.email/setup.sh | sudo bash

You’ll be prompted for an email domain, a hostname, and a few passwords. After that, the box configures itself — including DNS, DKIM keys, TLS certs, everything.

Once setup is done, check https://box.example.com/admin for the control panel.

To add mail users, just open the web UI. No CLI gymnastics needed.

Good Use Cases

– Hosting your own email for a single domain with minimal overhead
– Running mail for a dev team or family on a small VPS
– Replacing hosted email when privacy or control is a concern
– Setting up an air-gapped internal email system for testing or lab work
– Teaching how SMTP, IMAP, and DNS interact — by actually using them

Other articles

Submit your application