Mailu vs Mail-in-a-Box: Docker vs Bare Metal

Quick Verdict

Mailu is the better choice for anyone already using Docker. It’s portable, customizable, and runs alongside other services on the same server. Mail-in-a-Box wins on pure simplicity — one command on a dedicated Ubuntu server gives you a complete email system with automatic DNS, backups, and Let’s Encrypt. If Docker is part of your workflow, choose Mailu. If you want zero-configuration email on a dedicated VPS, choose Mail-in-a-Box.

Overview

Mailu and Mail-in-a-Box solve the same problem — self-hosted email — through fundamentally different approaches. Mailu is a Docker Compose project that packages Postfix, Dovecot, and supporting services into containers. Mail-in-a-Box is a bash script that installs everything directly on a bare Ubuntu server with no container abstraction.

AttributeMailuMail-in-a-Box
DeploymentDocker ComposeBash script on Ubuntu
ComponentsPostfix, Dovecot, Rspamd, Roundcube/RainLoopPostfix, Dovecot, SpamAssassin, Roundcube, Nextcloud
OS requirementAny OS with DockerUbuntu 22.04 only
Dedicated server neededNoYes
First release20162013
LicenseMITCC0 (Public Domain)
Kubernetes supportYes (Helm charts)No

Feature Comparison

FeatureMailuMail-in-a-Box
SMTPPostfixPostfix
IMAP/POP3DovecotDovecot
WebmailRoundcube or RainLoop (choice)Roundcube (no choice)
Spam filteringRspamdSpamAssassin + Postgrey
Virus scanningClamAV (optional)No
DKIM/SPF/DMARCYesYes (automatic)
DANE/TLSAOptionalYes (automatic)
DNSSECNoYes (built-in DNS server)
DNS managementExternalBuilt-in (nsd4)
SSL certificatesLet’s Encrypt (automatic)Let’s Encrypt (automatic)
Calendar (CalDAV)Via external serviceNextcloud (built-in)
Contacts (CardDAV)Via external serviceNextcloud (built-in)
ActiveSyncNoz-push
Admin panelWeb-basedWeb-based
Multi-domainYesYes
Per-user quotasYesYes
Sieve filtersYesYes
Two-factor authYes (WebAuthn)Yes (TOTP)
Static website hostingNoYes
Built-in backupNoYes (Duplicity)
APIYes (REST)Yes (REST)

Resource Usage

MetricMailuMail-in-a-Box
RAM (idle, no ClamAV)~500-700 MB~400 MB
RAM (idle, with ClamAV)~1-1.2 GBN/A (no virus scanning)
Containers6-80 (bare metal)
Disk (system)~1-2 GB (images)~2 GB

Mailu is heavier than Mail-in-a-Box when ClamAV is enabled, but lighter without it. Mail-in-a-Box’s bare-metal approach avoids Docker’s memory overhead (container runtime, networking layers).

Customization

AspectMailuMail-in-a-Box
Choose webmail clientYes (Roundcube/RainLoop)No
Custom Postfix settingsYesNo (overwritten on update)
Custom Dovecot settingsYesNo
Run alongside other servicesYesNo (dedicated machine)
Custom SSL certificatesYesNo
Fetchmail supportYes (built-in)No
Webmail choiceRoundcube or RainLoopRoundcube only

Mailu offers standard Docker customization: mount config files, adjust environment variables, add containers. Mail-in-a-Box explicitly rejects customization — it’s an appliance, not a platform.

Deployment Portability

ScenarioMailuMail-in-a-Box
Migrate to new serverCopy volumes, start containersRun setup script again, restore backup
OS upgradePull new imagesClean install, restore from backup
Scale to KubernetesYes (Helm charts)No
Run on ARMYes (multi-arch images)Limited (Ubuntu ARM required)
Backup/restoreDocker volume backupBuilt-in Duplicity to S3/local

Mailu’s Docker deployment makes migration straightforward — export volumes, start on new host. Mail-in-a-Box’s backup system works well but migration requires a fresh Ubuntu install.

Use Cases

Choose Mailu If…

  • You use Docker for other self-hosted services
  • You want email running alongside Nextcloud, Jellyfin, etc. on one server
  • You want to choose between webmail clients
  • You need custom Postfix or Dovecot configuration
  • You might scale to Kubernetes later
  • You want optional virus scanning (ClamAV)

Choose Mail-in-a-Box If…

  • You want the simplest possible email server setup
  • You have a dedicated VPS ($5-6/month) just for email
  • You want built-in DNS management (no manual DNS records)
  • You want built-in backup to S3 or local storage
  • You want Nextcloud contacts/calendar included automatically
  • You want ActiveSync for mobile devices
  • You’ve never administered a mail server before

Final Verdict

Mailu is the better technical choice — Docker gives you portability, customization, and the ability to share a server with other services. The Kubernetes support means Mailu can scale with you. For the selfhosting.sh audience (people who run Docker Compose stacks), Mailu fits naturally into existing infrastructure.

Mail-in-a-Box’s strength is that it’s genuinely one command. The built-in DNS management is its killer feature — setting up DNS records correctly is the hardest part of email self-hosting, and Mail-in-a-Box handles it automatically. If you’re setting up your first email server and want to minimize the chance of something going wrong, Mail-in-a-Box on a $6/month VPS is the path of least resistance.

FAQ

Can I run Mail-in-a-Box in Docker?

No. Mail-in-a-Box installs directly on a bare Ubuntu server and expects to control the entire system. It is fundamentally incompatible with Docker. If you want a Docker-based mail server, use Mailu, mailcow, or docker-mailserver.

Does Mail-in-a-Box manage DNS automatically?

Yes — this is its strongest feature. Mail-in-a-Box runs its own DNS server (nsd4) and automatically creates MX, SPF, DKIM, DMARC, DANE, and DNSSEC records. You only need to point your domain’s nameservers to the Mail-in-a-Box server. With Mailu, you must create all DNS records manually at your DNS provider.

Can I run Mailu alongside Nextcloud on the same server?

Yes. Mailu runs in Docker containers and does not take over the host system. You can run Mailu, Nextcloud, and other services on the same server by assigning different ports or using a shared reverse proxy. Mail-in-a-Box cannot share a server — it expects to be the only application running.

Which is better for email deliverability?

Both produce identical deliverability results — they use the same underlying mail transport (Postfix + Dovecot). Deliverability depends on your IP reputation, DNS records, and sending volume, not on which admin interface sits on top. Mail-in-a-Box has a slight edge because its automatic DNS management reduces the chance of misconfigured records.

Can I use my own SSL certificates with either?

Mailu supports custom SSL certificates by mounting them into the container. Mail-in-a-Box uses Let’s Encrypt exclusively and does not support custom certificates. If you need to use a specific CA-signed certificate (for compliance or organizational requirements), Mailu is the only option.

Which is easier to back up and restore?

Mail-in-a-Box has built-in automated backups using Duplicity, with support for local storage and Amazon S3. Restore is a documented process. Mailu has no built-in backup — you back up Docker volumes manually or use a tool like Borgmatic or Restic. Mail-in-a-Box wins on backup convenience.

Comments