summaryrefslogtreecommitdiffstats
path: root/lualib/auth_results.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-28 15:34:51 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-28 15:34:51 +0100
commit907cea71d114e3e8f9829e82870566e84bdaf6c0 (patch)
treec48f6a0e9e58b8623730b6a793607727e2d46b59 /lualib/auth_results.lua
parent392e2946371f5cf4f3f76fbaa11dd8c00515b967 (diff)
downloadrspamd-907cea71d114e3e8f9829e82870566e84bdaf6c0.tar.gz
rspamd-907cea71d114e3e8f9829e82870566e84bdaf6c0.zip
[Fix] Append MX name for authentication results as required
Diffstat (limited to 'lualib/auth_results.lua')
-rw-r--r--lualib/auth_results.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/lualib/auth_results.lua b/lualib/auth_results.lua
index f16a8f762..1b5b6e19f 100644
--- a/lualib/auth_results.lua
+++ b/lualib/auth_results.lua
@@ -67,6 +67,12 @@ local function gen_auth_results(task, settings)
symbols = {}
}
+ local received = task:get_received_headers() or {}
+ local mxname = (received[1] or {}).by_hostname
+ if mxname then
+ table.insert(hdr_parts, mxname)
+ end
+
for auth_type, symbols in pairs(auth_types) do
for key, sym in pairs(symbols) do
if not common.symbols.sym then
@@ -139,6 +145,7 @@ local function gen_auth_results(task, settings)
end
end
end
+
if #hdr_parts > 0 then
return table.concat(hdr_parts, '; ')
end