-
-
Save zavolo/dfc2810c355cab5ce217b1a506d60464 to your computer and use it in GitHub Desktop.
mailcow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream mailcow { | |
| server 192.168.3.3:8080; | |
| keepalive 32; | |
| } | |
| server { | |
| listen 443 ssl http2; | |
| listen [::]:443 ssl http2; | |
| server_name mail.example.com autodiscover.example.com autoconfig.example.com; | |
| ssl_certificate /etc/letsencrypt/live/mail.example.com/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/mail.example.com/privkey.pem; | |
| ssl_session_timeout 1d; | |
| ssl_session_tickets off; | |
| ssl_protocols TLSv1.2 TLSv1.3; | |
| ssl_ciphers HIGH:!aNULL:!MD5:!SHA1:!kRSA; | |
| ssl_prefer_server_ciphers off; | |
| large_client_header_buffers 4 32k; | |
| access_log /var/log/nginx/mailcow_access.log mailcow_detailed; | |
| error_log /var/log/nginx/mailcow_error.log; | |
| location /Microsoft-Server-ActiveSync { | |
| proxy_pass http://mailcow/Microsoft-Server-ActiveSync; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Connection ""; | |
| client_max_body_size 0; | |
| proxy_connect_timeout 75; | |
| proxy_send_timeout 3650; | |
| proxy_read_timeout 3650; | |
| proxy_buffers 64 512k; | |
| client_body_buffer_size 512k; | |
| } | |
| location / { | |
| proxy_pass http://mailcow; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto https; | |
| proxy_set_header Connection ""; | |
| client_max_body_size 0; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment