# MailServer configuration. # This is a revised version of the original work here: # https://github.com/docker-mailserver/docker-mailserver services: mailserver: image: docker.io/mailserver/docker-mailserver:latest container_name: mailserver # If the FQDN for your mail-server is only two labels (eg: example.com), # you can assign this entirely to `hostname` and remove `domainname`. hostname: mail domainname: hyperling.com env_file: mailserver.env # More information about the mail-server ports: # https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-ports/ # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks. 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: - /opt/Docker/Volumes/MailServer/data:/var/mail/ - /opt/Docker/Volumes/MailServer/state:/var/mail-state/ - /opt/Docker/Volumes/MailServer/logs:/var/log/mail/ - /opt/Docker/Volumes/MailServer/config:/tmp/docker-mailserver/ - /etc/localtime:/etc/localtime:ro restart: always stop_grace_period: 1m cap_add: - NET_ADMIN healthcheck: test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1" timeout: 3s retries: 0