Skip to main content


Mailu is a simple yet full-featured mail server as a set of Docker images. It is free software (both as in free beer and as in free speech), open to suggestions and external contributions. The project aims at providing people with an easily setup, easily maintained and full-featured mail server while not shipping proprietary software nor unrelated features often found in popular groupware.


Setting up the DNS

加一筆 A 與 MX 紀錄指向郵件主機 IN A a.b.c.d IN MX 10


DKIM 的 key 要從 Admin 管理介面 > Mail domains > Details > Generate keys。

Create the configuration file

透過這個網站產生 Docker 需要設定檔 docker-compose.yml , mailu.env



Step 1 - pick a flavor

  • Compose

Step 2 - Initial configuration

  • Mailu storage path: /mailu
  • Main mail domain and server display name:
  • Postmaster local part: admin
  • Choose how you wish to handle security: letsencrypt
  • Website name: Webmail - mailu
  • Linked Website URL:
  • Enable the admin UI (and path to the admin UI): unCheck 

    不啟用 admin UI 的外部網路存取

Step 3 - pick some features

  • Enable Web email client (and path to the Web email client): roundcube , /webmail

Step 4 - expose Mailu to the world

  • IPv4 listen address: <the public address of the server>
  • Subnet of the docker network: 

    這裡的子網路是指 docker 的 br-XXXX 介面。

  • Public hostnames:

Database preferences

  • Which database back end would you like to use: sqlite
Download the configuration file
mkdir /mailu
cd /mailu
Start the Compose project
cd /mailu
docker-compose -p mailu up -d

create the primary administrator user account

docker-compose -p mailu exec admin flask mailu admin myadmin THISISPASSWORD
Login as admin to verify

open the URL: login with the account that you just created.


Mail Management




docker-compose exec admin flask mailu user myuser 'password123'


docker-compose exec admin flask mailu user-delete