container-server/mail/docker-compose.yml

44 lines
1.1 KiB
YAML

version: '3.7'
# https://github.com/tomav/docker-mailserver/blob/master/README.md
networks:
mail:
name: mail
services:
mail:
image: tvial/docker-mailserver
container_name: mail
restart: "${RESTART:-no}"
hostname: mail
domainname: ${BASE_DOMAIN}
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
environment:
- SSL_TYPE=manual
- SSL_CERT_PATH=/etc/certs/${BASE_DOMAIN}.crt
- SSL_KEY_PATH=/etc/certs/${BASE_DOMAIN}.key
- PERMIT_DOCKER=connected-networks
- ONE_DIR=1
- DMS_DEBUG=1
- ENABLE_MANAGESIEVE=1
- ENABLE_SPAMASSASSIN=0
- ENABLE_CLAMAV=0
- ENABLE_FAIL2BAN=0
- ENABLE_POSTGREY=0
- SPOOF_PROTECTION=1
volumes:
- ${CERTS_DIR}/${BASE_DOMAIN}:/etc/certs
- ${BASE_DIR:-/srv}/mail/config/:/tmp/docker-mailserver/
- ${BASE_DIR:-/srv}/mail/data:/var/mail
- ${BASE_DIR:-/srv}/mail/state:/var/mail-state
- ${BASE_DIR:-/srv}/mail/logs:/var/log/mail
# cap_add:
# - NET_ADMIN
networks:
- mail