From: Vsevolod Stakhov Date: Sun, 28 May 2017 14:34:51 +0000 (+0100) Subject: [Fix] Append MX name for authentication results as required X-Git-Tag: 1.6.0~113 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=907cea71d114e3e8f9829e82870566e84bdaf6c0;p=rspamd.git [Fix] Append MX name for authentication results as required --- 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