Deploying a complete mail infrastructure doesn't have to involve complex database management. This production-ready mail server appliance focuses on a keep it simple and versioned approach, relying entirely on configuration files rather than SQL databases. It provides a comprehensive suite of mail services packaged neatly into a single container environment. Fullstack capabilities provide out-of-the-box support for SMTP, IMAP, and LDAP protocols. Built-in security includes integrated anti-spam and anti-virus protections to keep your inbox clean and secure. Helper scripts simplify configuration and ongoing administration tasks, while customizable behavior allows you to easily apply custom patches or alter default configurations using startup scripts. Whether you are setting up a personal email server or managing communications for an organization, this solution offers a robust, easily maintainable, and highly configurable email infrastructure.
services:
mailserver:
image: mailserver/docker-mailserver:latest
container_name: mailserver
# Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
hostname: ${DMS_HOSTNAME}
domainname: ${DMS_DOMAINNAME}
# More information about the mail-server ports:
# https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/
ports:
- "25:25" # SMTP (explicit TLS => STARTTLS)
- "143:143" # IMAP4 (explicit TLS => STARTTLS)
- "587:587" # ESMTP (explicit TLS => STARTTLS)
- "993:993" # IMAP4 (implicit TLS)
volumes:
- ./data/mail-data:/var/mail
- ./data/mail-state:/var/mail-state
- ./data/mail-logs:/var/log/mail
- ./data/config:/tmp/docker-mailserver
- /etc/localtime:/etc/localtime:ro
environment:
- ENABLE_SPAMASSASSIN=0
- ENABLE_CLAMAV=0
- ENABLE_FAIL2BAN=1
- ENABLE_POSTGREY=0
# SSL_TYPE can be 'manual', 'letsencrypt', 'self-signed', or empty
- SSL_TYPE=
restart: always
stop_grace_period: 1m
cap_add:
- NET_ADMINDMS_HOSTNAME=mail
DMS_DOMAINNAME=example.comAuto-fetched about 17 hours ago
Auto-fetched about 17 hours ago