Mailu — Dockerized Mail Server Stack
General Information
Mailu is an open-source project that takes the usual complexity of setting up a mail server and packages it into Docker containers. Instead of installing Postfix, Dovecot, Rspamd, Roundcube, and all the extras separately, Mailu bundles them in a ready-to-run compose stack.
It’s aimed at admins who want to self-host mail but prefer a reproducible, container-based setup. That makes it popular for VPS deployments, labs, and small organizations that don’t want to maintain every service manually.
How It Works
Mailu is essentially a collection of Docker images wired together. The main services include Postfix for SMTP, Dovecot for IMAP/POP3, Rspamd for spam filtering, and Roundcube for webmail. Optional containers add antivirus, web admin, and Let’s Encrypt certificates.
An admin runs the provided docker-compose.yml, sets a few environment variables (domain, passwords, volume paths), and the full mail stack comes online. Updates and rollbacks are just container pulls.
Functions
Feature | What it looks like in practice
—|—
Mail protocols | SMTP, IMAP, POP3 via Postfix and Dovecot
Spam filtering | Rspamd container with customizable policies
Webmail | Roundcube web client included
Administration | Web admin panel for users, domains, aliases
Security | TLS/SSL, DKIM/SPF/DMARC, Let’s Encrypt auto-certificates
Extensions | Optional antivirus, fetchmail, and external storage connectors
Deployment | Docker Compose stack, reproducible and portable
Licensing | Open source (MIT license)
Installation Guide
1. Install Docker and Docker Compose on a Linux server.
2. Clone the Mailu GitHub repository.
3. Generate mailu.env with the setup utility (domain, hostnames, credentials).
4. Run docker-compose up -d.
5. Configure DNS (MX, SPF, DKIM, DMARC).
6. Access the admin panel to create users and aliases.
7. Test with Roundcube webmail and IMAP clients.
A basic deployment usually runs in under an hour.
Everyday Use
– SMBs run Mailu on a VPS as a company mail server without buying into SaaS.
– Admins use it in labs to spin up mail stacks quickly for testing.
– Privacy-focused teams adopt it to keep mail under their own control with minimal manual setup.
– Schools and NGOs sometimes deploy it because it balances low cost with full features.
For users, it’s just Roundcube or Outlook/Thunderbird. For admins, it’s mostly watching Docker logs and pulling updates when needed.
Limitations
Mailu is designed for simplicity, not for giant deployments. Scaling beyond a few hundred mailboxes requires tuning or a different architecture. Being container-based, it’s tied to Docker Compose — admins who prefer bare-metal configs might find it restrictive. The project is active but community-driven, so support is mostly through forums and GitHub issues.
Comparison
Tool | Platforms | Strengths | Typical Fit
—|—|—|—
Mailu | Linux (Docker) | Full mail stack in containers | SMBs, VPS admins, labs
Mail-in-a-Box | Ubuntu LTS | Automated mail + DNS setup | Small orgs, personal domains
iRedMail | Multi-platform | Flexible scripted install | Admins needing custom setups
Zimbra OSE | Multi-platform | Mature groupware | Schools, SMBs, collaboration
Exchange | Windows/M365 | Enterprise-grade, heavy integration | Corporates, compliance-driven
Notes from the Field
Admins often say Mailu feels like “mail the Docker way.” The strong point is repeatability — bring up the same stack on another server with a single compose file. The most common advice: back up volumes carefully, since all user data and configs live there.