Docker Mailserver Setup: 7 Easy Steps and 5 Mistakes
Docker Mailserver (the docker-mailserver project, DMS) is a complete mail server in one container: Postfix for SMTP, Dovecot for IMAP, OpenDKIM, Amavis and optional spam and virus filters, configured through one environment file and a setup command. This guide sets up Docker Mailserver 16.0.1 with the project's own compose.yaml , creates accounts and an alias, sends and reads real mail, and generates DKIM keys. Every output below comes from a test run on 17 October 2026 (podman 5.8 with podman-compose on a Fedora host as the engine; the docker commands are identical), including five errors you are likely to meet. curl -sO https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/v16.0.1/compose.yaml curl -sO https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/v16.0.1/mailserver.env docker compose up -d docker exec -it mailserver setup email add admin@example.com # within 120 s of the first start docker exec mailserver setup config dkim ...