diff options
author | bjoe2k4 <bjoe2k4@users.noreply.github.com> | 2018-03-30 21:09:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 21:09:01 +0200 |
commit | e7879ae70d28af48a5a52a3cb31fdf81571c7012 (patch) | |
tree | 4fcd20b0cbba71359af34b32068345514b436cf6 /lualib | |
parent | 92387a131c7a20b23349b746917ba9a32deb6913 (diff) | |
download | rspamd-e7879ae70d28af48a5a52a3cb31fdf81571c7012.tar.gz rspamd-e7879ae70d28af48a5a52a3cb31fdf81571c7012.zip |
[Minor] Improve AuthservID generation in AR-header
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_auth_results.lua | 8 |
1 files changed, 4 insertions, 4 deletions
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 |