Hi, I’m running into an issue when trying to use an external Nginx reverse proxy (outside Docker) to access the Mailcow web interface.
When I configure the reverse proxy outside the Docker environment (on the host, pointing to 127.0.0.1:8080), I get repeated Nginx errors like this:
recv() failed (104: Connection reset by peer) while reading response header from upstream
Example Nginx log entries:
2025/06/18 16:02:15 [error] 141448#141448: *82 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.116.250.196, server: webmail.arcoiriscreative.es, request: “GET /admin/system HTTP/1.1”, upstream: “http://127.0.0.1:8080/admin/system”
2025/06/18 16:02:42 [error] 141448#141448: *84 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 128.116.250.196, server: webmail.arcoiriscreative.es, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://127.0.0.1:8080/favicon.ico”
However, when I move the reverse proxy into a container (inside Docker), everything works perfectly. The Mailcow web interface loads as expected with no connection issues.
System setup:
Mailcow running in Docker
External Nginx reverse proxy on host (127.0.0.1:8080)
TLS termination on the external proxy
iptables rules allow connections as needed (DROP default policies, with specific ACCEPTs)
Troubleshooting so far:
Verified that the backend is listening and responds correctly
No container crashes or backend errors in Mailcow logs
Only occurs when using a host-based reverse proxy
Expected behavior:
Mailcow should respond correctly to reverse proxy requests from the host (non-Docker) Nginx, just like it does when proxied from within Docker.
Any advice or known limitations regarding this setup?
Thanks!
Logs:
docker logs –tail=50 mailcowdockerized-nginx-mailcow-1
10.213.101.8 - - [18/Jun/2025:16:30:51 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:30:56 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:31:22 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:31:45 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:31:49 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:31:50 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:32:28 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:32:33 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:32:38 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:32:43 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:33:13 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:33:31 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:33:36 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:33:46 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:34:16 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:34:19 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:34:24 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:34:51 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:34:54 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:35:21 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:35:26 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:35:38 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:35:54 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:36:29 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:36:31 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:36:36 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:37:03 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:37:23 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:37:33 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:37:38 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:38:07 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:38:16 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:38:41 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:38:45 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:38:46 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:39:23 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:39:25 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:39:48 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:39:53 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:40:00 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:40:06 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:40:29 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:40:30 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:40:34 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:40:36 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:41:07 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:41:21 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:41:29 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:41:34 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:41:48 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
docker logs –tail=50 mailcowdockerized-php-fpm-mailcow-1
10.213.101.10 - 18/Jun/2025:16:27:16 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:27:54 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:27:59 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:28:02 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:28:38 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:28:43 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:29:00 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:29:44 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:29:49 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:29:49 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:30:46 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:30:51 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:30:56 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:31:45 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:31:49 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:31:50 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:32:33 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:32:38 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:32:43 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:33:13 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:33:31 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:33:36 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:34:16 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:34:19 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:34:24 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:34:54 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:35:21 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:35:26 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:35:38 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:36:29 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:36:31 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:36:36 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:37:23 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:37:33 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:37:38 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:38:07 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:38:41 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:38:45 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:38:46 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:39:23 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:39:48 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:39:53 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:40:00 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:40:29 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:40:34 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:40:36 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:41:21 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:41:29 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:41:34 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:42:10 +0200 “HEAD /settings.php” 304
Logs:
docker logs –tail=50 mailcowdockerized-nginx-mailcow-1
10.213.101.8 - - [18/Jun/2025:16:30:51 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:30:56 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:31:22 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:31:45 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:31:49 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:31:50 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:32:28 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:32:33 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:32:38 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:32:43 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:33:13 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:33:31 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:33:36 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:33:46 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:34:16 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:34:19 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:34:24 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:34:51 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:34:54 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:35:21 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:35:26 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:35:38 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:35:54 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:36:29 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:36:31 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:36:36 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:37:03 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:37:23 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:37:33 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:37:38 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:38:07 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:38:16 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:38:41 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:38:45 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:38:46 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:39:23 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:39:25 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:39:48 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:39:53 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:40:00 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:40:06 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:40:29 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:40:30 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:40:34 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:40:36 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:41:07 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:41:21 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:41:29 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:41:34 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:41:48 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
docker logs –tail=50 mailcowdockerized-php-fpm-mailcow-1
10.213.101.10 - 18/Jun/2025:16:27:16 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:27:54 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:27:59 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:28:02 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:28:38 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:28:43 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:29:00 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:29:44 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:29:49 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:29:49 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:30:46 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:30:51 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:30:56 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:31:45 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:31:49 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:31:50 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:32:33 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:32:38 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:32:43 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:33:13 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:33:31 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:33:36 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:34:16 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:34:19 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:34:24 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:34:54 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:35:21 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:35:26 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:35:38 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:36:29 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:36:31 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:36:36 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:37:23 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:37:33 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:37:38 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:38:07 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:38:41 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:38:45 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:38:46 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:39:23 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:39:48 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:39:53 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:40:00 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:40:29 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:40:34 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:40:36 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:41:21 +0200 “HEAD /settings.php” 304
10.213.101.10 - 18/Jun/2025:16:41:29 +0200 “HEAD /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:41:34 +0200 “GET /forwardinghosts.php” 200
10.213.101.10 - 18/Jun/2025:16:42:10 +0200 “HEAD /settings.php” 304
Logs:
docker logs –tail=50 mailcowdockerized-nginx-mailcow-1
10.213.101.8 - - [18/Jun/2025:16:30:51 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:30:56 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:31:22 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:31:45 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:31:49 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:31:50 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:32:28 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:32:33 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:32:38 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:32:43 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:33:13 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:33:31 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:33:36 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:33:46 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:34:16 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:34:19 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:34:24 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:34:51 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:34:54 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:35:21 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:35:26 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:35:38 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:35:54 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:36:29 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:36:31 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:36:36 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:37:03 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:37:23 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:37:33 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:37:38 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:38:07 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:38:16 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:38:41 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:38:45 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:38:46 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:39:23 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:39:25 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:39:48 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:39:53 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:40:00 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:40:06 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:40:29 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:40:30 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:40:34 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:40:36 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:41:07 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
10.213.101.8 - - [18/Jun/2025:16:41:21 +0200] “HEAD /settings.php HTTP/1.1” 304 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:41:29 +0200] “HEAD /forwardinghosts.php HTTP/1.1” 200 0 “-” “rspamd-3.11.1”
10.213.101.8 - - [18/Jun/2025:16:41:34 +0200] “GET /forwardinghosts.php HTTP/1.1” 200 27 “-” “rspamd-3.11.1”
10.213.101.12 - - [18/Jun/2025:16:41:48 +0200] “GET / HTTP/1.1” 200 15 “-” “check_http/v (nagios-plugins 2.4.10)”
Steps to reproduce:
- Deploy a clean ARM64 virtual machine (tested on Ubuntu 22.04 LTS)
- Install Docker and Docker Compose
- Clone Mailcow repository and check out the latest
2025-05
tag
- Run
docker-compose up -d
to start Mailcow normally
- Ensure
nginx-mailcow
exposes port 8080 on 127.0.0.1
(host loopback only)
- On the host (outside Docker), configure an Nginx reverse proxy with the following:
- Listens on port 443
- Uses
proxy_pass http://127.0.0.1:8080
- Proper TLS config (can be self-signed)
- Access
https://<your-mailcow-domain>/admin/system
from a browser
- Observe in the host Nginx logs:
recv() failed (104: Connection reset by peer) while reading response header from upstream
- Confirm via
docker logs
:
nginx-mailcow
and php-fpm-mailcow
show no request received on /admin/system
- As a workaround, move the same reverse proxy inside Docker and attach it to the
mailcowdockerized_mailcow-network
- Now
/admin/system
works correctly — confirming it’s a network exposure / forwarding issue
Logs of iptables -L -vn:
Chain INPUT (policy DROP)
pkts bytes target prot opt in out source destination
…. ACCEPT all – lo * 0.0.0.0/0 0.0.0.0/0
…. ACCEPT all – IF_EXT * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
…. ACCEPT tcp – IF_EXT * 10.0.0.X 0.0.0.0/0 tcp dpt:22
…. ACCEPT tcp – IF_EXT * PUBLIC_IP_A 0.0.0.0/0 tcp dpt:22
…. ACCEPT tcp – IF_INT * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
…. ACCEPT tcp – IF_INT * 10.0.0.X 0.0.0.0/0 tcp dpt:22
…. ACCEPT tcp – IF_EXT * 0.0.0.0/0 0.0.0.0/0 multiport dports REDIS_PORTS
…. ACCEPT tcp – IF_EXT * 0.0.0.0/0 0.0.0.0/0 multiport dports CUSTOM_APP_PORTS
…. ACCEPT tcp – lo * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
…. ACCEPT tcp – IF_EXT * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
…. ACCEPT tcp – IF_EXT * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
…. ACCEPT tcp – IF_EXT * PUBLIC_IP_A 0.0.0.0/0 tcp dpt:3000
…. ACCEPT tcp – IF_EXT * PUBLIC_IP_B 0.0.0.0/0 tcp dpt:9090
…. ACCEPT tcp – IF_EXT * 0.0.0.0/0 0.0.0.0/0 multiport dports SMTP_PORTS,IMAP_PORTS,SIEVE_PORTS
Chain FORWARD (policy DROP)
pkts bytes target prot opt in out source destination
…. MAILCOW
…. DOCKER-USER
…. DOCKER-FORWARD
Chain OUTPUT (policy ACCEPT)
pkts bytes target prot opt in out source destination
…. ACCEPT all – * lo 0.0.0.0/0 0.0.0.0/0
Chain DOCKER
…. ACCEPT tcp – !br-mailcow br-mailcow 0.0.0.0/0 10.213.101.10 tcp dpt:8080
…. ACCEPT tcp – !br-mailcow br-mailcow 0.0.0.0/0 10.213.101.253 tcp dpt:465
…. ACCEPT tcp – !br-mailcow br-mailcow 0.0.0.0/0 10.213.101.250 tcp dpt:4190
…. DROP all – !br-xxxxxx br-xxxxxx 0.0.0.0/0 0.0.0.0/0
…. DROP all – !docker0 docker0 0.0.0.0/0 0.0.0.0/0
Chain MAILCOW
…. DROP tcp – !br-mailcow br-mailcow 0.0.0.0/0 0.0.0.0/0 multiport dports MYSQL,REDIS,SOLR,CUSTOM_PORT
Logs of ip6tables -L -vn:
Chain INPUT (policy ACCEPT 40 packets, 3033 bytes)
pkts bytes target prot opt in out source destination
40 3033 MAILCOW 0 – * * ::/0 ::/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 MAILCOW 0 – * * ::/0 ::/0
0 0 DOCKER-USER 0 – * * ::/0 ::/0
0 0 DOCKER-FORWARD 0 – * * ::/0 ::/0
Chain OUTPUT (policy ACCEPT 1538 packets, 98865 bytes)
pkts bytes target prot opt in out source destination
Chain DOCKER (0 references)
pkts bytes target prot opt in out source destination
Chain DOCKER-BRIDGE (1 references)
pkts bytes target prot opt in out source destination
Chain DOCKER-CT (1 references)
pkts bytes target prot opt in out source destination
Chain DOCKER-FORWARD (1 references)
pkts bytes target prot opt in out source destination
0 0 DOCKER-CT 0 – * * ::/0 ::/0
0 0 DOCKER-ISOLATION-STAGE-1 0 – * * ::/0 ::/0
0 0 DOCKER-BRIDGE 0 – * * ::/0 ::/0
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
pkts bytes target prot opt in out source destination
Chain DOCKER-ISOLATION-STAGE-2 (0 references)
pkts bytes target prot opt in out source destination
Chain DOCKER-USER (1 references)
pkts bytes target prot opt in out source destination
0 0 RETURN 0 – * * ::/0 ::/0
Chain MAILCOW (2 references)
pkts bytes target prot opt in out source destination
Logs of iptables -L -vn -t nat:
Chain PREROUTING (policy ACCEPT)
pkts bytes target prot opt in out source destination
1350 77593 DOCKER all – * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT)
Chain OUTPUT (policy ACCEPT)
75 4500 DOCKER all – * * 0.0.0.0/0 !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT)
1841 137K MASQUERADE all – * !br-mailcow 10.213.101.0/24 0.0.0.0/0
0 0 MASQUERADE all – * !docker0 172.17.0.0/16 0.0.0.0/0
0 0 MASQUERADE all – * !br-<other> 172.18.0.0/16 0.0.0.0/0
Chain DOCKER
0 0 RETURN all – br-mailcow * 0.0.0.0/0 0.0.0.0/0
0 0 RETURN all – docker0 * 0.0.0.0/0 0.0.0.0/0
0 0 RETURN all – br-<other> * 0.0.0.0/0 0.0.0.0/0
Port forwarding rules
0 0 DNAT tcp – !br-mailcow * 0.0.0.0/0 127.0.0.1 tcp dpt:7654 to:10.213.101.249:6379
0 0 DNAT tcp – !br-mailcow * 0.0.0.0/0 127.0.0.1 tcp dpt:13306 to:10.213.101.5:3306
4 240 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:110 to:10.213.101.250:110
0 0 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:143 to:10.213.101.250:143
2 100 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:993 to:10.213.101.250:993
0 0 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:995 to:10.213.101.250:995
0 0 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:4190 to:10.213.101.250:4190
0 0 DNAT tcp – !br-mailcow * 0.0.0.0/0 127.0.0.1 tcp dpt:19991 to:10.213.101.250:12345
0 0 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25 to:10.213.101.253:25
3 180 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:465 to:10.213.101.253:465
6 340 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:587 to:10.213.101.253:587
0 0 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080 to:10.213.101.10:8080
0 0 DNAT tcp – !br-mailcow * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8443 to:10.213.101.10:8443
Logs of ip6tables -L -vn -t nat:
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DOCKER 0 – * * ::/0 ::/0 ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DOCKER 0 – * * ::/0 !::1 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain DOCKER (2 references)
pkts bytes target prot opt in out source destination
DNS check:
root@arm-arcoiriscreative-1:/mnt/data/mailcow-dockerized# docker exec -it mailcowdockerized-acme-mailcow-1 dig +short stackoverflow.com @10.213.101.254
104.18.32.7
172.64.155.249