2023-11-06 16:57:16 +08:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
mailserver:
|
2023-12-03 10:27:04 +08:00
|
|
|
image: ghcr.io/docker-mailserver/docker-mailserver:13.0.1
|
2023-11-06 16:57:16 +08:00
|
|
|
container_name: ${CONTAINER_NAME}
|
|
|
|
hostname: ${MS_HOSTNAME}
|
|
|
|
env_file: ./conf/mailserver.env
|
|
|
|
ports:
|
|
|
|
- "${PANEL_APP_PORT_SMTP}:25"
|
|
|
|
- "${PANEL_APP_PORT_IMAP4_143}:143"
|
|
|
|
- "${PANEL_APP_PORT_ESMTP_465}:465"
|
|
|
|
- "${PANEL_APP_PORT_ESMTP_587}:587"
|
|
|
|
- "${PANEL_APP_PORT_IMAP4_993}:993"
|
|
|
|
volumes:
|
|
|
|
- ./data/dms/mail-data/:/var/mail/
|
|
|
|
- ./data/dms/mail-state/:/var/mail-state/
|
|
|
|
- ./data/dms/mail-logs/:/var/log/mail/
|
|
|
|
- ./data/dms/config/:/tmp/docker-mailserver/
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- 1panel-network
|
|
|
|
stop_grace_period: 1m
|
|
|
|
labels:
|
|
|
|
createdBy: "Apps"
|
|
|
|
healthcheck:
|
|
|
|
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
|
|
|
|
timeout: 3s
|
|
|
|
retries: 0
|
|
|
|
networks:
|
|
|
|
1panel-network:
|
|
|
|
external: true
|