From 907cea71d114e3e8f9829e82870566e84bdaf6c0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 28 May 2017 15:34:51 +0100 Subject: [PATCH] [Fix] Append MX name for authentication results as required --- lualib/auth_results.lua | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.39.5