Skip to content

Commit 65b3c71

Browse files
committed
Add mailcow proxy conf sample
1 parent 0ea06f4 commit 65b3c71

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

mailcow.subdomain.conf.sample

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
## Version 2025/05/31
2+
# make sure that your mailcow container is named mailcow
3+
# make sure that you are aqquainted with the mailcow documentation (https://docs.mailcow.email/)
4+
# make sure you have read the most important entries in the "Get Started" section, "Post Installation Tasks -> Reverse Proxy -> Overview" and "Post Installation Tasks -> Reverse Proxy -> Nginx" sections
5+
# make sure that your dns is configured as per your domain requirements and the mailcow documentation
6+
# make sure to set up a mechanism to copy your SSL certificate after each renewal to /data/assets/ssl/ directory for mailcow to use (see mailcow documentation in "Post Installation Tasks -> Reverse Proxy -> Overview")
7+
8+
server {
9+
listen 443 ssl;
10+
listen [::]:443 ssl;
11+
12+
# modify these to match your domain/mailcow configuration
13+
server_name mailcow.* autoconfig.* autodiscover.*;
14+
15+
include /config/nginx/ssl.conf;
16+
include /config/nginx/proxy.conf;
17+
18+
client_max_body_size 0;
19+
20+
# enable for ldap auth (requires ldap-location.conf in the location block)
21+
#include /config/nginx/ldap-server.conf;
22+
23+
# enable for Authelia (requires authelia-location.conf in the location block)
24+
#include /config/nginx/authelia-server.conf;
25+
26+
# enable for Authentik (requires authentik-location.conf in the location block)
27+
#include /config/nginx/authentik-server.conf;
28+
29+
location / {
30+
# enable the next two lines for http auth
31+
#auth_basic "Restricted";
32+
#auth_basic_user_file /config/nginx/.htpasswd;
33+
34+
# enable for ldap auth (requires ldap-server.conf in the server block)
35+
#include /config/nginx/ldap-location.conf;
36+
37+
# enable for Authelia (requires authelia-server.conf in the server block)
38+
#include /config/nginx/authelia-location.conf;
39+
40+
# enable for Authentik (requires authentik-server.conf in the server block)
41+
#include /config/nginx/authentik-location.conf;
42+
43+
include /config/nginx/resolver.conf;
44+
set $upstream_app mailcow;
45+
set $upstream_port 8080;
46+
set $upstream_proto http;
47+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
48+
49+
proxy_buffer_size 128k;
50+
proxy_buffers 64 512k;
51+
proxy_busy_buffers_size 512k;
52+
}
53+
54+
location /Microsoft-Server-ActiveSync {
55+
include /config/nginx/resolver.conf;
56+
set $upstream_app mailcow;
57+
set $upstream_port 8080;
58+
set $upstream_proto http;
59+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
60+
61+
proxy_connect_timeout 75;
62+
proxy_send_timeout 3650;
63+
proxy_read_timeout 3650;
64+
proxy_buffers 64 512k;
65+
66+
client_body_buffer_size 512k;
67+
}
68+
}

0 commit comments

Comments
 (0)