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.netig.net networks: - mailserver env_file: .env # More information about the mail-server ports: # https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/ ports: - "25:25" # SMTP (explicit TLS => STARTTLS, Authentication is DISABLED => use port 465/587 instead) - "143:143" # IMAP4 (explicit TLS => STARTTLS) - "465:465" # ESMTP (implicit TLS) - "587:587" # ESMTP (explicit TLS => STARTTLS) - "993:993" # IMAP4 (implicit TLS) volumes: - ./volumes/mail-data/:/var/mail/ - ./volumes/mail-state/:/var/mail-state/ - ./volumes/mail-logs/:/var/log/mail/ - ./volumes/config/:/tmp/docker-mailserver/ - /etc/localtime:/etc/localtime:ro # mail.netig.net certs - ../dwalin-caddy/volumes/data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/mail.netig.net/mail.netig.net.crt:/etc/letsencrypt/live/mail.netig.net/fullchain.pem:ro - ../dwalin-caddy/volumes/data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/mail.netig.net/mail.netig.net.key:/etc/letsencrypt/live/mail.netig.net/privkey.pem:ro # mail.lachaussettedebrasparts.fr certs - ../dwalin-caddy/volumes/data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/mail.lachaussettedebrasparts.fr/mail.lachaussettedebrasparts.fr.crt:/etc/letsencrypt/live/mail.lachaussettedebrasparts.fr/fullchain.pem:ro - ../dwalin-caddy/volumes/data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/mail.lachaussettedebrasparts.fr/mail.lachaussettedebrasparts.fr.key:/etc/letsencrypt/live/mail.lachaussettedebrasparts.fr/privkey.pem:ro # mail.lachaussettedelocquirec.fr certs - ../dwalin-caddy/volumes/data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/mail.lachaussettedelocquirec.fr/mail.lachaussettedelocquirec.fr.crt:/etc/letsencrypt/live/mail.lachaussettedelocquirec.fr/fullchain.pem:ro - ../dwalin-caddy/volumes/data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/mail.lachaussettedelocquirec.fr/mail.lachaussettedelocquirec.fr.key:/etc/letsencrypt/live/mail.lachaussettedelocquirec.fr/privkey.pem:ro 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 networks: mailserver: external: true