server { listen 443 ssl; listen [::]:443 ssl; server_name mail.${env['domain']}; location / { proxy_pass https://127.0.0.1:${env['ports']['mailserver_https']}; include /etc/nginx/snippets/websocket.conf; include /etc/nginx/snippets/proxy.conf; } } server { listen 443 ssl; listen [::]:443 ssl; server_name autoconfig.${env['domain']}; location / { return 404; } location = /mail/config-v1.1.xml { proxy_pass https://127.0.0.1:${env['ports']['mailserver_https']}; } } server { listen 443 ssl; listen [::]:443 ssl; server_name mta-sts.${env['domain']}; location / { return 404; } location = /.well-known/mta-sts.txt { proxy_pass https://127.0.0.1:${env['ports']['mailserver_https']}; } }