All apps · 0 apps
Docker-Mailserver
Docker app from Kulisch's Repository
Overview
A production-ready fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.). Only configuration files, no SQL database. Keep it simple and versioned. Easy to deploy and upgrade.
h3 Preperations /h3
This short guide will help you to set up a mailserver.
To keep the mailserver running, there are some important points to consider, like at least one configured mail account, SSL type, hostname, etc.
If these points are missing, they will be mentioned in the Docker logs to simplify troubleshooting.
Make sure, you got an domain and a static IP adress to setup your mailserver.
MX and A DNS entries are needed. After that, portforward the mentioned ports in your router.
h3 Initial steps: /h3
The following placeholders will be used:
b user /b is the mail account you create.
b example.com /b is the domain you are using.
b mail.example.com /bis the FQDN of the mailserver.
b password /bis the password for your mail account./b
- At first, setup the b environment variables /b and change b--hostname mail.example.com /b in the b Extra Parameters (advanced view)/b as needed.
Choose custom b Network Type /b and set an fixed IP Adress. (didn't tested other options)
- Create an e-mail account by starting the container with bPost arguments /b (advanced view):
bsetup email add user@example.com 'password'/b
bsetup email add admin@company.org 'Ch33rs#M8!' /b (for example)
b Remove the post arguments. /b
Start container and check the logs.
Optional and recommended: Open Container Console and type in...
bsetup config dkim/b
Try to connect to the server with an e-mail client.
Test sending and recieving mails
Optional: If everything works, you can enable bFail2Ban/b in the environment variables
For further informations, visit the extended documention:
Readme
View on GitHubDocker Mailserver
:page_with_curl: About
A production-ready fullstack but simple containerized mail server (SMTP, IMAP, LDAP, Anti-spam, Anti-virus, etc.).
- Only configuration files, no SQL database. Keep it simple and versioned. Easy to deploy and upgrade.
- Originally created by @tomav, this project is now maintained by volunteers since January 2021.
[!TIP] Be sure to read our documentation. It provides guidance on initial setup of your mail server.
[!IMPORTANT] If you have issues, please search through the documentation for your version before opening an issue.
The issue tracker is for issues, not for personal support.
Make sure the version of the documentation matches the image version you're using!
:link: Links to Useful Resources
:package: Included Services
- Postfix with SMTP or LDAP authentication and support for extension delimiters
- Dovecot with SASL, IMAP, POP3, LDAP, basic Sieve support and quotas
- Rspamd
- Amavis
- SpamAssassin supporting custom rules
- ClamAV with automatic updates
- OpenDKIM & OpenDMARC
- Fail2ban
- Fetchmail
- Getmail6
- Postscreen
- Postgrey
- Support for LetsEncrypt, manual and self-signed certificates
- A setup script for easy configuration and maintenance
- SASLauthd with LDAP authentication
- OAuth2 authentication (via
XOAUTH2orOAUTHBEARERSASL mechanisms)
Install Docker-Mailserver on Unraid in a few clicks.
Find Docker-Mailserver in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Categories
Download Statistics
Total Downloads Over Time
Related apps
Explore more like this
Explore allLinks
Details
mailserver/docker-mailserver:latestRuntime arguments
- Network
bridge- Shell
bash- Privileged
- false
- Extra Params
--hostname mail.example.com --restart=unless-stopped --cap-add=NET_ADMIN --cap-add=SYS_PTRACE
Template configuration
SMTP (explicit TLS => STARTTLS) Port
- Target
- 25
- Default
- 25
- Value
- 25
IMAP4 (explicit TLS => STARTTLS) Port
- Target
- 143
- Default
- 143
- Value
- 143
ESMTP (implicit TLS) Port
- Target
- 465
- Default
- 465
- Value
- 465
ESMTP (explicit TLS => STARTTLS) Port
- Target
- 587
- Default
- 587
- Value
- 587
IMAP4 (implicit TLS) Port
- Target
- 993
- Default
- 993
- Value
- 993
/var/mail/
- Target
- /var/mail/
- Default
- /mnt/user/appdata/dms/mail-data/
- Value
- /mnt/user/appdata/dms/mail-data/
/var/mail-state/
- Target
- /var/mail-state/
- Default
- /mnt/user/appdata/dms/mail-state/
- Value
- /mnt/user/appdata/dms/mail-state/
/var/log/mail/
- Target
- /var/log/mail/
- Default
- /mnt/user/appdata/dms/mail-log/
- Value
- /mnt/user/appdata/dms/mail-log/
/tmp/docker-mailserver/
- Target
- /tmp/docker-mailserver/
- Default
- /mnt/user/appdata/dms/config/
- Value
- /mnt/user/appdata/dms/config/
bempty/b = SSL disabled b (NOT recommended)/b bletsencrypt/b = Enables Let's Encrypt certificates b (/etc/letsencrypt/live/example.com/) /b bcustom/b = Enables custom certificates bmanual/b = Let's you manually specify locations of your SSL certificates for non-standard cases bself-signed/b= Enables self-signed certificates If bemtpy/b is b not /b choosen, go to = Show more settings...
- Target
- SSL_TYPE
bMounting path/b where certs are stored If bletsencrypt/b is choosen as bSSL Type/b, then path structure bmust/b look like this: Host: /mnt/user/appdata/.../letsencrypt/ Container: /etc/letsencrypt/
- Target
- /etc/letsencrypt/
This is only supported with b`SSL_TYPE=manual`/b. Provide the path to your bkey/b file that you've mounted access to within the container. Example: /etc/letsencrypt/live/example.com/privkey.pem
- Target
- SSL_KEY_PATH
This is only supported with b`SSL_TYPE=manual`/b. Provide the path to your bcert/b file that you've mounted access to within the container. Example: /etc/letsencrypt/live/example.com/fullchain.pem
- Target
- SSL_CERT_PATH
Greylist <br> 1 = Enable <br> 0 = Disable
- Target
- ENABLE_POSTGREY
- Default
- 0
- Value
- 1
Fail2Ban <br> 1 = Enable <br> 0 = Disable
- Target
- ENABLE_FAIL2BAN
- Default
- 0
- Value
- 0
ClamAV <br> 1 = Enable <br> 0 = Disable
- Target
- ENABLE_CLAMAV
- Default
- 1
- Value
- 1
empty => 10240000 (~10 MB)
- Target
- POSTFIX_MESSAGE_SIZE_LIMIT
- Default
- 10240000
- Value
- 10240000
Localtime
- Target
- /etc/localtime
- Default
- /etc/localtime
- Value
- /etc/localtime
Spamassassin <br> 1 = Enable <br> 0 = Disable
- Target
- ENABLE_SPAMASSASSIN
- Default
- 1
- Value
- 1
0 => mail state in default directories <br> 1 => consolidate all states into a single directory (`/var/mail-state`) to allow persistence using docker volumes
- Target
- ONE_DIR
- Default
- 1
- Value
- 1
deliver spam messages in the inbox <br> 1 = Enable <br> 0 = Disable
- Target
- SPAMASSASSIN_SPAM_TO_INBOX
- Default
- 0
- Value
- 1
Managesieve
- Target
- 4190
- Default
- 4190
- Value
- 4190
Managesieve <br> 1 = Enable <br> 0 = Disable
- Target
- ENABLE_MANAGESIEVE
- Default
- 0
- Value
- 1