]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Improve AuthservID generation in AR-header 2134/head
authorbjoe2k4 <bjoe2k4@users.noreply.github.com>
Fri, 30 Mar 2018 19:09:01 +0000 (21:09 +0200)
committerGitHub <noreply@github.com>
Fri, 30 Mar 2018 19:09:01 +0000 (21:09 +0200)
lualib/lua_auth_results.lua

index 92f702950614166fa4677b9f5a7bda0158343aa3..fcde73e0ac023443840cf910aefe915766675026 100644 (file)
@@ -16,6 +16,7 @@ limitations under the License.
 ]]--
 
 local global = require "global_functions"
+local rspamd_util = require "rspamd_util"
 
 local default_settings = {
   spf_symbols = {
@@ -76,10 +77,9 @@ 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)
+  local hostname = rspamd_util.get_hostname()
+  if hostname then
+    table.insert(hdr_parts, hostname)
   end
 
   for auth_type, symbols in pairs(auth_types) do