docker-mailserver
Docker Mailserver is a containerized, configuration-file-based mail server bundling SMTP, IMAP, LDAP support, anti-spam and anti-virus.
- GitHub stars
- 19k
- Last commit
- 3 days ago
- Latest release
- v16.0.1
- Licence
- MIT
- Self-hosted
- Yes

Docker Mailserver runs a complete mail server inside a container. It bundles SMTP and IMAP services (Postfix and Dovecot, according to the project topics), optional LDAP authentication, and anti-spam and anti-virus tooling, so a self-hoster does not have to assemble each piece separately.
The design is deliberately simple: it uses configuration files only, with no SQL database, which keeps setups easy to version, deploy and upgrade. Related topics include fail2ban and Rspamd. The documentation covers initial setup, environment variables, updating and an FAQ, and the project asks users to match the documentation version to the image version they run.
Docker Mailserver is released under the MIT license and has been maintained by volunteers since January 2021. It is a self-hosting project with no hosted offering, suited to administrators who want to run their own mail on a server they control.
Key features
- Postfix SMTP and Dovecot IMAP in one container
- Optional LDAP authentication
- Anti-spam and anti-virus included
- Fail2ban protection against brute-force logins
- Configuration files only, no SQL database
- Simple versioning and upgrades
Pricing: Free and open source under the MIT license.






