confusion 修订了这个 Gist . 跳至此修订
1 file changed, 31 insertions
docker-compose.yml(file created)
@@ -0,0 +1,31 @@ | |||
1 | + | services: | |
2 | + | mailserver: | |
3 | + | image: ghcr.io/docker-mailserver/docker-mailserver:latest | |
4 | + | container_name: mailserver | |
5 | + | # Provide the FQDN of your mail server here (Your DNS MX record should point to this value) | |
6 | + | hostname: mail.example.com | |
7 | + | env_file: mailserver.env | |
8 | + | # More information about the mail-server ports: | |
9 | + | # https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/ | |
10 | + | ports: | |
11 | + | - "25:25" # SMTP (explicit TLS => STARTTLS, Authentication is DISABLED => use port 465/587 instead) | |
12 | + | - "143:143" # IMAP4 (explicit TLS => STARTTLS) | |
13 | + | - "465:465" # ESMTP (implicit TLS) | |
14 | + | - "587:587" # ESMTP (explicit TLS => STARTTLS) | |
15 | + | - "993:993" # IMAP4 (implicit TLS) | |
16 | + | volumes: | |
17 | + | - /var/dms/mail-data/:/var/mail/ | |
18 | + | - /var/dms/mail-state/:/var/mail-state/ | |
19 | + | - /var/dms/mail-logs/:/var/log/mail/ | |
20 | + | - /var/dms/config/:/tmp/docker-mailserver/ | |
21 | + | - /var/dms/le:/etc/letsencrypt | |
22 | + | - /etc/localtime:/etc/localtime:ro | |
23 | + | restart: always | |
24 | + | stop_grace_period: 1m | |
25 | + | # Uncomment if using `ENABLE_FAIL2BAN=1`: | |
26 | + | # cap_add: | |
27 | + | # - NET_ADMIN | |
28 | + | healthcheck: | |
29 | + | test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1" | |
30 | + | timeout: 3s | |
31 | + | retries: 0 |
更新
更早