Insular email distribution - mail server as Docker images
open sourceMITself-hostablefree
Mailu is a mail server distributed as a set of Docker images: a front container that routes web and mail traffic, an admin app, Postfix, Dovecot, Rspamd, and optional antivirus, Radicale for WebDAV contacts, fetchmail and webmail. It runs with Docker Compose or on Kubernetes with its Helm chart. A web admin manages domains, users, aliases, quotas and per-domain admins; it enforces TLS with Let's Encrypt, DANE and MTA-STS, signs outgoing mail with DKIM, filters spam with auto-learning and greylisting, and serves Roundcube or SnappyMail webmail. It also has a REST API, a command-line tool, passkey sign-in, OAuth 2.0 sign-in for mail clients and random aliases through an API that works with Bitwarden. Mailu is MIT licensed, uses only free software components, and is built by volunteers.
Ways to install
On Kubernetes
Hosted for you
Problems it solves
- run my own mail server for a few domains as Docker containers without wiring Postfix and Dovecot together by hand
- stop paying per mailbox for business email and host it on our own VPS
- set up email for my family's domain on a small server with 1 GB of RAM
- manage mail domains, users, aliases and quotas from a web admin page instead of config files
- let each customer's domain admin manage their own mailboxes on a shared mail server
- self-hosted email with Roundcube or SnappyMail webmail and spam filtering that learns
- make our mail server enforce TLS, DANE and MTA-STS with Let's Encrypt certificates renewed automatically
- generate DKIM keys and the DNS records to publish for each mail domain
- create mailboxes and aliases from a script through a REST API on our own mail server
- generate throwaway email aliases from my password manager on my own domain
- sign webmail users in with passkeys instead of passwords
- let Thunderbird sign in to our IMAP server with OAuth instead of storing a password
- deploy a mail server on our Kubernetes cluster with a Helm chart
- run a mail server on an ARM board like a Raspberry Pi with Docker
- full-text search inside email attachments on our self-hosted mail server
Features
- IMAP, SMTP and submission with auto-configuration profiles for mail clients
- aliases, domain aliases, custom routing, full-text search of attachments, IMAP METADATA and BURL
- web administration: global admins, per-domain delegation, quotas, announcements, relayed domains
- user self-service: auto-reply, auto-forward, fetched accounts, ManageSieve, OpenPGP key publication through WKD
- Roundcube and SnappyMail webmail
- enforced TLS, DANE, MTA-STS, Let's Encrypt certificates and outgoing DKIM
- Rspamd anti-spam with auto-learning, greylisting, DMARC and SPF checks and anti-spoofing
- antivirus scanning and blocking of malicious attachments and macro documents
- passkey sign-in for webmail and admins; one-time account setup links
- OAuth 2.0 issuer so mail clients sign in through the browser, with revocable sessions and a Thunderbird add-on
View 10 more
- authentication tokens for mail clients
- Anonmail: random aliases from the admin UI or a SimpleLogin-style API compatible with Bitwarden
- RESTful API with Swagger UI for everything the admin interface does
- command-line tool for users, aliases, domains and config import and export
- header authentication for single sign-on through a trusted reverse proxy
- optional Radicale WebDAV for contacts (CardDAV) and fetchmail
- SQLite by default, or external PostgreSQL or MySQL/MariaDB
- multi-arch images for amd64, arm64 and armv7
- Helm chart for Kubernetes
- setup utility at setup.mailu.io that generates the configuration
Limitations
- Doesn't run without Docker: Mailu ships only as Docker images, and running it without Docker isn't supported4
- Doesn't run on x86 CPUs without SSE4.2: its Rspamd image needs it, so pre-Nehalem Intel, older Atom and pre-Bulldozer AMD processors can't run it45
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
Alternatives
The same job
These do what Mailu does.
- docker-mailserver Production-ready fullstack but simple mail server running inside a container
- mailcow The mailserver suite with the 'moo'
- Mail-in-a-Box Mail-in-a-Box lets you become your own mail service provider in a few easy steps
- Stalwart Secure, scalable mail & collaboration server with comprehensive protocol support
- iRedMail Full-featured, open source mail server solution for mainstream Linux/BSD distributions
- Maddy Mail Server Composable all-in-one mail server
