From 2e4046737675ffc8c2da4e50100e01ef69a7cc3e Mon Sep 17 00:00:00 2001 From: Didier 'OdyX' Raboud Date: Mon, 27 Mar 2023 22:41:20 +0200 Subject: [PATCH] nginx with PROXY protocol for mail; only set_real_ip_from in 'all' and 'mail' alternatives --- core/nginx/conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/nginx/conf/nginx.conf b/core/nginx/conf/nginx.conf index 4b560f9c..9afa0af9 100644 --- a/core/nginx/conf/nginx.conf +++ b/core/nginx/conf/nginx.conf @@ -325,7 +325,7 @@ mail { ssl_session_cache shared:SSLMAIL:3m; {% endif %} - {% if PROXY_PROTOCOL and REAL_IP_FROM %}{% for from_ip in REAL_IP_FROM.split(',') %} + {% if PROXY_PROTOCOL in ['all', 'mail'] and REAL_IP_FROM %}{% for from_ip in REAL_IP_FROM.split(',') %} set_real_ip_from {{ from_ip }}; {% endfor %}{% endif %}