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
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
Mailcow
Email Clients & Servers
mailcow: dockerized - ๐ฎ + ๐ = ๐
GPL-3.0vs Google Workspaceโ 14k
Mailu
Email Clients & Servers
Insular email distribution - mail server as Docker images
OSSvs Gmailโ 7.6k
Mail-in-a-Box
Email Clients & Servers
Mail-in-a-Box helps individuals take back control of their email by defining a one-click,
CC0-1.0vs Gmailโ 15k
Stalwart
Email Clients & Servers
All-in-one Mail & Collaboration server. Secure, scalable and fluent in every protocol (IMA
OSSvs Google Workspaceโ 16k
Forward Email
Email Clients & Servers
Privacy-focused encrypted email for everyone. All-in-one alternative to Gmail + Mailchimp
OSSvs Fastmailโ 1.7k
Tuta
Email Clients & Servers
Tuta is an email service with a strong focus on security and privacy that lets you encrypt
GPL-3.0vs Gmailโ 8.2k
SaaS alternatives to docker-mailserver
See all
Gmail
Email Clients & Servers
Google email service with search, filters, labels and spam protection
SaaS
Fastmail
Email Clients & Servers
Paid email provider with custom domains, calendars and contacts
SaaS
Zoho Mail
Email Clients & Servers
Business email hosting from Zoho with custom domains, calendar and admin tools
SaaS
Proton Mail
Email Clients & Servers
Encrypted email service from Proton with calendar, contacts and custom domains
SaaS
StartMail
Email Clients & Servers
Private email service with unlimited aliases and PGP encryption
SaaS
Posteo
Email Clients & Servers
Ad-free, privacy-focused email service powered by renewable energy
SaaS

IceWarp
SmarterMail
Axigen
Titan Email
Rackspace Email
AOL Mail
GMX Mail
Mail.com
iCloud Mail
ImprovMX