container-server/mail/docker-compose.yml
2019-12-25 15:48:01 +01:00

41 lines
982 B
YAML

version: '3.7'
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
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