Public | Automated Build

Last pushed: 8 months ago
Short Description
Containerized All-In-One Mailserver
Full Description


What Is this ?

A containerized, production ready, full featured, full ssl secured (for free) mailserver almost zero-config, easy to deploy and reproduce without lost data. (A dream ?)

What I take ?

  • Postfix/dovecot web server ready to setup to your email clients
  • Webmail endpoint ssl secured (roundcube)
  • Admin endpoint ssl secures (postfix admin), ready for multiple domains
  • Endpoints to use with your email clients imap smpt (NOT pop)
  • All SSL secured with Let's Encrypt auto renew


Linux, Postfix, Dovecot, spamassassin, MySQL, Roundcube, Postfix Admin, Caddyserver,


  • Docker host with static ip
  • Domain name
  • Ability to write dns entries (dns server, or use the dns api of vultr, digitalocean...)


Write dns entries and restart the dns server, if you use one    3600 IN    A (docker host ip) 3600 IN    A (docker host ip)    3600 IN    A (docker host ip)    3600 IN    A (docker host ip)        3600 IN MX 10

You can use multiple domains just write an mx record for each one indicating your smtp server        3600 IN MX 10

Create a directory to your host for persistent data: accounts, emails, databases and logs, having this folder you can reproduce your server without loss anyhing. (accounts, data...)

mkdir -p /data/ 

Start docker.

docker run  -d \
-v /data/log:/var/log \
-v /data/vmail:/var/vmail \
-v /data/mysql:/var/lib/mysql \
-v /data/ssl:/ssl \
-v /data/caddy:/root/.caddy \
-p 25:25 \
-p 80:80 \
-p 143:143 \
-p 443:443 \
-p 465:465 \
-p 993:993 \
-e "PADMIN=admin" \
-e "PADMP=password" \
-e "" \
-e "" \
-e "" \
-e "" \
-e "" \
-e "" \
-e "ACME_STAGING=true" \

If your server is for production remove -e "ACME_STAGING=true" to get valid certificates from letsencrypt, NOT deploy much times the image without ACME_STAGING=true because lets encrypt will hit rate limit.

After running container, you can access admin panel here -, use login and password defined within docker start, with variables PADMP abd PADMIN, change it after first use, then you must add domains in Domain List > New Domain and create accounts in Virtual List > Add Mailbox

Webmail can be accessed here -, using accounts created with admin panel. Or you can use your mail client via ports: smtp, imap, imaps, smtps.

As username use full email address either webmail or email clients

This repository is based on

Feel free to contribute!

Docker Pull Command
Source Repository