A production-ready, fullstack mail server running inside a Docker container. Provides SMTP, IMAP, LDAP, antispam (Rspamd), and antivirus capabilities out of the box. Built on Postfix and Dovecot with Fail2Ban integration for brute-force protection. Supports Kubernetes deployment, Let's Encrypt TLS, DKIM/DMARC/SPF authentication, and relay host configuration. Designed to be simple to set up while offering enterprise-grade email infrastructure for self-hosted environments.
git clone https://github.com/docker-mailserver/docker-mailserver.git
# Quick start with Docker Compose
DMS_GITHUB_URL="https://raw.githubusercontent.com/\
docker-mailserver/docker-mailserver/master"
# Download compose and env files
curl -o compose.yaml "${DMS_GITHUB_URL}/compose.yaml"
curl -o mailserver.env "${DMS_GITHUB_URL}/mailserver.env"
# Create account and start
./setup.sh email add [email protected] password
docker compose up -d