How to Set Up a Mailu Server

Updated

Mailu is a full-featured mail server delivered as a set of Docker images, and you set it up by choosing a deployment method (Docker Compose or Kubernetes), meeting that method's requirements, configuring DNS, and then running the stack. The Docker Compose path is the standard starting point; Kubernetes is an alternative for those already running a cluster. Both are documented in the project's own docs, which are written as part of the repository and evolve with it — so match the documentation version to the Mailu version you run.

What Mailu gives you before you start

Knowing the scope helps you decide whether it fits your environment. Per the project, Mailu is free software (both as in free beer and as in free speech), open to suggestions and external contributions, and aims to be easily set up, easily maintained, and full-featured without shipping proprietary software or unrelated groupware features.

Its stated main features:

  • Standard email server — IMAP and IMAP+, SMTP and Submission, with auto-configuration profiles for clients
  • Advanced email features — aliases, domain aliases, custom routing, full-text search of email attachments
  • Web access — multiple webmails and an administration interface
  • User features — aliases, auto-reply, auto-forward, fetched accounts, managesieve
  • Admin features — global admins, announcements, per-domain delegation, quotas
  • Security — enforced TLS, DANE, MTA-STS, Letsencrypt, outgoing DKIM, anti-virus scanner, Snuffleupagus, blocking of malicious attachments
  • Antispam — auto-learn, greylisting, DMARC and SPF, anti-spoofing
  • Freedom — all FOSS components, no tracker included

If you need a mail server you can maintain yourself without proprietary components, this feature set is the baseline you are deploying.

Choose a deployment method

Method Use it when Documented as
Docker Compose You want the standard, self-contained setup on one host "Docker Compose setup" under Setup, with "Docker compose requirements" listed separately
Kubernetes You already run a cluster and want Mailu managed there "Kubernetes setup" under Setup

Both paths share the same configuration reference and the same post-setup tasks, so the choice mainly affects how the containers are orchestrated, not what the mail server does.

Prerequisites

Before configuring anything, work through the items the documentation groups under Setup:

  1. Meet the Docker Compose requirements. The docs list "Docker compose requirements" as its own topic — check this before writing any configuration, since it defines what your host must provide.
  2. Set up your DNS. "Setting up your DNS" is a required step in the setup sequence, not an optional extra. Mail delivery and client auto-configuration depend on it.
  3. Decide on optional components (see the next section) so you configure them in one pass rather than retrofitting later.

Optional choices to make up front

The documentation exposes these as configuration decisions:

  • External reverse proxy — "Using an external reverse proxy" is a documented configuration option, relevant if you already terminate TLS or route traffic elsewhere.
  • Database back-end — "Changing the database back-end" is documented, so the default can be swapped if you have an existing database to use.

Deciding these before you deploy avoids reconfiguring a running server.

Setup steps

  1. Confirm the Docker Compose requirements for your host.
  2. Follow the Docker Compose setup (or the Kubernetes setup) to produce your configuration and bring up the stack.
  3. Configure DNS as described in "Setting up your DNS."
  4. Apply optional configuration — external reverse proxy and/or database back-end — if you chose them above.
  5. Verify using the project's own demonstration server, which documents its functionality, how to connect to it, and how to add domains. Comparing your instance against the demo is a concrete way to confirm the web interface and mail flow behave as expected.

After setup: administration

Once running, Mailu is maintained through several documented surfaces:

  • Web administration interface
  • Mailu command line
  • Mailu RESTful API
  • Spam filtering settings
  • Maintain a Mailu server — the general upkeep topic

For contributors, the docs also cover the contribution workflow, project guidelines, development environment, altering the database, the pull-request checklist, I18N and L10N, and firewalling.

Common sticking points

  • Version mismatch with the docs. The documentation is written as part of the repository and evolves with it. The docs explicitly warn to access the proper version based on the Mailu version you are running — a mismatch is an easy way to follow instructions that no longer apply.
  • Skipping DNS. Because "Setting up your DNS" sits inside the setup sequence, treating it as an afterthought tends to surface later as delivery or client-configuration problems.
  • Ignoring the Compose requirements. These are listed as a distinct prerequisite, so verify them before debugging configuration.

Where to look next

The documentation's General section covers general concepts, philosophy, history, features and screenshots, admin interface screenshots, and a FAQ split into informational, deployment-related, and technical-issues categories. Release notes run from the current 2024.06 release back through Mailu 2.0, 1.9, 1.8, 1.7, 1.6, 1.5, 1.3, and the earlier Freeposte.io 1.2 and 1.1 releases — useful if you are running or upgrading an older version. Note that "upgrade" appears in the site's own keyword signals, so check the release notes for your version before moving between releases.