2023-10-20 15:50:35 +02:00
|
|
|
version: '2.2'
|
|
|
|
|
|
|
|
services:
|
|
|
|
mailserver:
|
|
|
|
image: ghcr.io/docker-mailserver/docker-mailserver:latest
|
|
|
|
container_name: mailserver
|
|
|
|
# Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
|
|
|
|
hostname: mail.ixvd.net
|
2023-10-20 17:32:45 +02:00
|
|
|
env_file: /etc/ixvd/secrets/env/mailserver.env
|
2023-10-20 15:50:35 +02:00
|
|
|
# More information about the mail-server ports:
|
|
|
|
# https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/
|
|
|
|
# To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
|
2023-10-30 01:42:49 +01:00
|
|
|
environment:
|
|
|
|
SSL_TYPE: "manual"
|
|
|
|
SSL_CERT_PATH: "/etc/letsencrypt/live/mail.ixvd.net/fullchain.pem"
|
|
|
|
SSL_KEY_PATH: "/etc/letsencrypt/live/mail.ixvd.net/privkey.pem"
|
2023-10-20 15:50:35 +02:00
|
|
|
ports:
|
|
|
|
- "25:25" # SMTP (explicit TLS => STARTTLS)
|
|
|
|
- "143:143" # IMAP4 (explicit TLS => STARTTLS)
|
|
|
|
- "465:465" # ESMTP (implicit TLS)
|
|
|
|
- "587:587" # ESMTP (explicit TLS => STARTTLS)
|
|
|
|
- "993:993" # IMAP4 (implicit TLS)
|
|
|
|
volumes:
|
|
|
|
- /srv/mailserver/data:/var/mail/
|
|
|
|
- /srv/mailserver/config:/tmp/docker-mailserver/
|
|
|
|
- /srv/mailserver/other/state:/var/mail-state/
|
|
|
|
- /srv/mailserver/other/log/:/var/log/mail/
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
2023-11-09 20:42:29 +01:00
|
|
|
- /srv/certbot:/etc/letsencrypt:ro # Certbot volume
|
2023-10-20 15:50:35 +02:00
|
|
|
restart: always
|
|
|
|
stop_grace_period: 1m
|
|
|
|
# Uncomment if using `ENABLE_FAIL2BAN=1`:
|
|
|
|
# cap_add:
|
|
|
|
# - NET_ADMIN
|
|
|
|
healthcheck:
|
|
|
|
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
|
|
|
|
timeout: 3s
|
|
|
|
retries: 0
|