diff options
Diffstat (limited to 'files/usr/local/etc/nginx/vhosts.conf.smtp_server')
-rw-r--r-- | files/usr/local/etc/nginx/vhosts.conf.smtp_server | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/files/usr/local/etc/nginx/vhosts.conf.smtp_server b/files/usr/local/etc/nginx/vhosts.conf.smtp_server index 71d6db8..4b84ede 100644 --- a/files/usr/local/etc/nginx/vhosts.conf.smtp_server +++ b/files/usr/local/etc/nginx/vhosts.conf.smtp_server @@ -9,14 +9,19 @@ server { add_header Strict-Transport-Security "max-age=63072000" always; +$(if [ -n "$rspamd_admin_users" ]; then +echo ' auth_gss on;' +echo " auth_gss_keytab ${nginx_keytab};" +printf ' auth_gss_authorized_principal %s;\n' $rspamd_admin_users +fi) + location / { 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; - +$(if [ -z "$rspamd_admin_users" ]; then +echo ' proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' +fi) proxy_pass http://127.0.0.1:${rspamd_port}/; } } |