Mail-in-a-Box
Mail In A Box turns a fresh Ubuntu VPS into a complete email server with one script. Installs Postfix, Dovecot, Roundcube, Nextcloud contacts and calendar, and auto-configures all DNS records
Quick Start
curl -s https://mailinabox.email/setup.sh | sudo bash Overview
Mail-in-a-Box gets a complete mail server running with a single bash command on a fresh Ubuntu 22.04 VPS. One script installs and configures Postfix for SMTP, Dovecot for IMAP, Roundcube for webmail, Nextcloud for contacts and calendar sync, spam filtering, greylisting, and automatic DNS records covering SPF, DKIM, DMARC, and MTA-STS. Let’s Encrypt certificates provision automatically.
The defining philosophy is no customization after install. There are no configuration options and you should not modify the server’s config files once setup completes. That constraint is what makes the self-checking work: the installer can audit the full system state, and the web control panel shows a status check for every DNS record and system component, so you know at a glance whether your mail is deliverable.
One requirement to flag before you start: Mail-in-a-Box needs a dedicated server, a fresh machine running nothing else. Containers and modified images are not supported. If you already run a multi-purpose VPS, this needs its own machine.
Compared to mailcow, which uses Docker and supports more configuration, Mail-in-a-Box is the simpler and more opinionated option. For email that works on a $5-10/month VPS without configuration overhead, it is consistently the recommendation in self-hosted communities. The deliverability challenges that apply to any self-hosted email server apply here too.
Use Cases
Specific ways to use Mail-in-a-Box for your workflow.
Deployment Strategy
Recommended ways to host Mail-in-a-Box in your own environment.