Docker-Mailserver
Docker 应用程序 from Kulisch's Repository
概述
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:
运行时参数
- 网络
bridge- 外壳
bash- 特权
- false
- 额外参数
--hostname mail.example.com --restart=unless-stopped --cap-add=NET_ADMIN --cap-add=SYS_PTRACE
模板配置
SMTP (explicit TLS => STARTTLS) Port
- 目标
- 25
- 默认值
- 25
- 价值
- 25
IMAP4 (explicit TLS => STARTTLS) Port
- 目标
- 143
- 默认值
- 143
- 价值
- 143
ESMTP (implicit TLS) Port
- 目标
- 465
- 默认值
- 465
- 价值
- 465
ESMTP (explicit TLS => STARTTLS) Port
- 目标
- 587
- 默认值
- 587
- 价值
- 587
IMAP4 (implicit TLS) Port
- 目标
- 993
- 默认值
- 993
- 价值
- 993
/var/mail/
- 目标
- /var/mail/
- 默认值
- /mnt/user/appdata/dms/mail-data/
- 价值
- /mnt/user/appdata/dms/mail-data/
/var/mail-state/
- 目标
- /var/mail-state/
- 默认值
- /mnt/user/appdata/dms/mail-state/
- 价值
- /mnt/user/appdata/dms/mail-state/
/var/log/mail/
- 目标
- /var/log/mail/
- 默认值
- /mnt/user/appdata/dms/mail-log/
- 价值
- /mnt/user/appdata/dms/mail-log/
/tmp/docker-mailserver/
- 目标
- /tmp/docker-mailserver/
- 默认值
- /mnt/user/appdata/dms/config/
- 价值
- /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...
- 目标
- 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/
- 目标
- /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
- 目标
- 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
- 目标
- SSL_CERT_PATH
Greylist <br> 1 = Enable <br> 0 = Disable
- 目标
- ENABLE_POSTGREY
- 默认值
- 0
- 价值
- 1
Fail2Ban <br> 1 = Enable <br> 0 = Disable
- 目标
- ENABLE_FAIL2BAN
- 默认值
- 0
- 价值
- 0
ClamAV <br> 1 = Enable <br> 0 = Disable
- 目标
- ENABLE_CLAMAV
- 默认值
- 1
- 价值
- 1
empty => 10240000 (~10 MB)
- 目标
- POSTFIX_MESSAGE_SIZE_LIMIT
- 默认值
- 10240000
- 价值
- 10240000
Localtime
- 目标
- /etc/localtime
- 默认值
- /etc/localtime
- 价值
- /etc/localtime
Spamassassin <br> 1 = Enable <br> 0 = Disable
- 目标
- ENABLE_SPAMASSASSIN
- 默认值
- 1
- 价值
- 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
- 目标
- ONE_DIR
- 默认值
- 1
- 价值
- 1
deliver spam messages in the inbox <br> 1 = Enable <br> 0 = Disable
- 目标
- SPAMASSASSIN_SPAM_TO_INBOX
- 默认值
- 0
- 价值
- 1
Managesieve
- 目标
- 4190
- 默认值
- 4190
- 价值
- 4190
Managesieve <br> 1 = Enable <br> 0 = Disable
- 目标
- ENABLE_MANAGESIEVE
- 默认值
- 0
- 价值
- 1
下载统计数据
长期下载总量
详细信息
mailserver/docker-mailserver:latest在Unraid 上运行 Docker-Mailserver 。
Docker-Mailserver 已被列入Unraid OS 的社区应用程序。探索Unraid ,构建灵活的家庭服务器、NAS 或家庭实验室。