diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-03 22:38:06 -0400 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-03 22:38:06 -0400 |
commit | a1bddcb1de1053994fb445267ca5d1ffaecb0fb5 (patch) | |
tree | ba2f614ac93dabc6b148037fc604966c7907b384 /files/usr/local/etc/nginx/vhosts.conf.smtp_server | |
parent | 47f90d0916ac34ef132e3bb6da92a4a67dffbba8 (diff) | |
download | infrastructure-a1bddcb1de1053994fb445267ca5d1ffaecb0fb5.tar.gz |
more postfix/rspamd stuff
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}/; } } |