From e7073a76bd2543beef76428b4662dbc9ad68ee07 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 26 Nov 2017 18:05:23 +0000 Subject: [Feature] Implement DKIM reputation adjustments --- lualib/lua_redis.lua | 5 ++++- lualib/rspamd_config_transform.lua | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'lualib') diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua index eda8dc37f..8dafa023b 100644 --- a/lualib/lua_redis.lua +++ b/lualib/lua_redis.lua @@ -103,9 +103,10 @@ local function rspamd_parse_redis_server(module_name, module_opts, no_fallback) else opts = module_opts end - local ret = false if opts then + local ret + if opts.redis then ret = try_load_redis_servers(opts.redis, result) @@ -127,6 +128,8 @@ local function rspamd_parse_redis_server(module_name, module_opts, no_fallback) opts = rspamd_config:get_all_opt('redis') if opts then + local ret + if opts[module_name] then ret = try_load_redis_servers(opts[module_name], result) if ret then diff --git a/lualib/rspamd_config_transform.lua b/lualib/rspamd_config_transform.lua index af3e8180e..c7bf56b90 100644 --- a/lualib/rspamd_config_transform.lua +++ b/lualib/rspamd_config_transform.lua @@ -15,7 +15,6 @@ limitations under the License. ]]-- local logger = require "rspamd_logger" -local fun = require "fun" local function override_defaults(def, override) if not override then @@ -83,9 +82,9 @@ local function metric_pairs(t) for k,v in pairs(tbl) do if type(k) ~= 'number' then -- We can also have implicit arrays here - local is_implicit = is_implicit(v) + local sym_implicit = is_implicit(v) - if is_implicit then + if sym_implicit then for _,elt in ipairs(v) do table.insert(keys, {k, elt}) end -- cgit v1.2.3