From e7879ae70d28af48a5a52a3cb31fdf81571c7012 Mon Sep 17 00:00:00 2001 From: bjoe2k4 Date: Fri, 30 Mar 2018 21:09:01 +0200 Subject: [Minor] Improve AuthservID generation in AR-header --- lualib/lua_auth_results.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lualib/lua_auth_results.lua') diff --git a/lualib/lua_auth_results.lua b/lualib/lua_auth_results.lua index 92f702950..fcde73e0a 100644 --- a/lualib/lua_auth_results.lua +++ b/lualib/lua_auth_results.lua @@ -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 -- cgit v1.2.3