diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-16 17:52:15 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-16 17:52:15 +0100 |
commit | 190530179aa87127ffd6980b86bc58a52a1286ad (patch) | |
tree | 8b4a5fc9ee4f226ba30643a272242fa4362faded /lualib/lua_auth_results.lua | |
parent | 38dfe192fc706ffcad31296105dca7248cca6104 (diff) | |
download | rspamd-190530179aa87127ffd6980b86bc58a52a1286ad.tar.gz rspamd-190530179aa87127ffd6980b86bc58a52a1286ad.zip |
[Minor] Cache hostname value
Diffstat (limited to 'lualib/lua_auth_results.lua')
-rw-r--r-- | lualib/lua_auth_results.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lualib/lua_auth_results.lua b/lualib/lua_auth_results.lua index fcde73e0a..e8808d842 100644 --- a/lualib/lua_auth_results.lua +++ b/lualib/lua_auth_results.lua @@ -55,6 +55,7 @@ local default_settings = { } local exports = {} +local local_hostname = rspamd_util.get_hostname() local function gen_auth_results(task, settings) local table = table @@ -77,9 +78,9 @@ local function gen_auth_results(task, settings) symbols = {} } - local hostname = rspamd_util.get_hostname() - if hostname then - table.insert(hdr_parts, hostname) + + if local_hostname then + table.insert(hdr_parts, local_hostname) end for auth_type, symbols in pairs(auth_types) do |