services: mailserver: image: ghcr.io/docker-mailserver/docker-mailserver:latest container_name: mailserver hostname: {{ mail_domain }} ports: - "0.0.0.0:25:25" - "0.0.0.0:465:465" - "0.0.0.0:587:587" - "0.0.0.0:993:993" volumes: - ./docker-data/dms/mail-data/:/var/mail/ - ./docker-data/dms/mail-state/:/var/mail-state/ - ./docker-data/dms/mail-logs/:/var/log/mail/ - ./docker-data/dms/config/:/tmp/docker-mailserver/ - ./docker-data/dms/config/dovecot-ldap.conf:/etc/dovecot/dovecot-ldap.conf.ext - /etc/letsencrypt:/etc/letsencrypt:ro - /etc/localtime:/etc/localtime:ro environment: - SSL_TYPE=letsencrypt - ENABLE_CLAMAV=1 - ENABLE_AMAVIS=1 - ENABLE_FAIL2BAN=1 - ENABLE_SASLAUTHD=1 - ENABLE_POSTGREY=0 - SPOOF_PROTECTION=1 - ACCOUNT_PROVISIONER=LDAP - LDAP_SERVER_HOST={{ ldap_server_host }} - LDAP_SEARCH_BASE={{ ldap_search_base }} - LDAP_BIND_DN={{ ldap_bind_dn }} - LDAP_BIND_PW={{ email_ldap_api_token }} - LDAP_QUERY_FILTER_USER={{ ldap_query_filter_user }} - LDAP_QUERY_FILTER_GROUP={{ ldap_query_filter_group }} - LDAP_QUERY_FILTER_ALIAS={{ ldap_query_filter_alias }} - LDAP_QUERY_FILTER_DOMAIN={{ ldap_query_filter_domain }} - LDAP_QUERY_FILTER_SENDERS={{ ldap_query_filter_senders }} - POSTMASTER_ADDRESS={{ postmaster_email }} - ENABLE_SASLAUTHD=1 - SASLAUTHD_MECHANISMS=ldap - SASLAUTHD_LDAP_FILTER={{ sasl_ldap_filter }} restart: always