From 4b491d9de57d98876ba6e9084b2e3e5cf8f036ca Mon Sep 17 00:00:00 2001 From: Dimitri Huisman Date: Wed, 6 Jul 2022 08:51:59 +0000 Subject: [PATCH] Re-enable the built-in nginx resolver for traffic going through the mail plugin. This is required for passing rDNS/ptr information to postfix. The mail proxy uses the resolver info for passing XCLIENT info. See http://nginx.org/en/docs/mail/ngx_mail_proxy_module.html#xclient Without this info rspamd will flag all messages with DHFILTER_HOSTNAME_UNKNOWN due to the missing rDNS/ptr info. --- core/nginx/conf/nginx.conf | 1 + towncrier/newsfragments/2368.bugfix | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 towncrier/newsfragments/2368.bugfix diff --git a/core/nginx/conf/nginx.conf b/core/nginx/conf/nginx.conf index 44b6b7ee..80ebdaee 100644 --- a/core/nginx/conf/nginx.conf +++ b/core/nginx/conf/nginx.conf @@ -277,6 +277,7 @@ mail { server_name {{ HOSTNAMES.split(",")[0] }}; auth_http http://127.0.0.1:8000/auth/email; proxy_pass_error_message on; + resolver {{ RESOLVER }} valid=30s; error_log /dev/stderr info; {% if TLS and not TLS_ERROR %} diff --git a/towncrier/newsfragments/2368.bugfix b/towncrier/newsfragments/2368.bugfix new file mode 100644 index 00000000..54c29c48 --- /dev/null +++ b/towncrier/newsfragments/2368.bugfix @@ -0,0 +1,3 @@ +Re-enable the built-in nginx resolver for traffic going through the mail plugin. +This is required for passing rDNS/ptr information to postfix. +Without this rspamd will flag all messages with DHFILTER_HOSTNAME_UNKNOWN due to the missing rDNS/ptr info. \ No newline at end of file