]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Append MX name for authentication results as required
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 28 May 2017 14:34:51 +0000 (15:34 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 28 May 2017 14:34:51 +0000 (15:34 +0100)
lualib/auth_results.lua

index f16a8f7624672855f5a0989aaa2fd0982ced6298..1b5b6e19fca3353e49203f2d90108d1ddae60524 100644 (file)
@@ -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