From: bjoe2k4 Date: Fri, 30 Mar 2018 19:09:01 +0000 (+0200) Subject: [Minor] Improve AuthservID generation in AR-header X-Git-Tag: 1.7.4~91^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7879ae70d28af48a5a52a3cb31fdf81571c7012;p=thirdparty%2Frspamd.git [Minor] Improve AuthservID generation in AR-header --- diff --git a/lualib/lua_auth_results.lua b/lualib/lua_auth_results.lua index 92f7029506..fcde73e0ac 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