docker-mailserver

Open source

Docker Mailserver is a containerized, configuration-file-based mail server bundling SMTP, IMAP, LDAP support, anti-spam and anti-virus.

docker-mailserver.github.io
docker-mailserver homepage screenshot
GitHub stars
20k
Last 30 days
+308(+2%)
Last commit
2 days ago
Repository age
11 years
Version
v17.0.0
Licence
MIT
Self-hosted
Yes

About docker-mailserver

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

Good fit for

  • Self-hosted email for a small organization
  • Running a personal mail server in Docker
Built with
Shell tools
Tags
mail-server
email
smtp
imap
docker
self-hosted
postfix
dovecot
rspamd

docker-mailserver: questions and answers

What is docker-mailserver used for?
docker-mailserver is a containerized, configuration-file-based mail server bundling SMTP, IMAP, LDAP support, anti-spam and anti-virus. It is a good fit for self-hosted email for a small organization and running a personal mail server in Docker.
Is docker-mailserver open source?
Yes. docker-mailserver is open source under the MIT licence. Its source code is on GitHub at docker-mailserver/docker-mailserver and is written mainly in Shell.
Is docker-mailserver free?
Yes. docker-mailserver is open source, so the software itself is free to use.
Can I self-host docker-mailserver?
Yes. docker-mailserver can be self-hosted on your own server or infrastructure; there is no official hosted version.
What is docker-mailserver an alternative to?
docker-mailserver is an open-source alternative to Gmail, Fastmail, Zoho Mail and Proton Mail. Other open-source alternatives to Gmail include Mailcow, Mailu and Mail-in-a-Box.
Is docker-mailserver actively maintained?
Yes. The most recent commit to docker-mailserver was on 11 November 2026, and the latest release is v17.0.0, published on 5 November 2026. The project has 20k stars on GitHub, with 308 added in the last 30 days.

Open-source alternatives to docker-mailserver

See all

SaaS alternatives to docker-mailserver

See all