diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-11-26 18:05:23 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-11-26 18:05:23 +0000 |
commit | e7073a76bd2543beef76428b4662dbc9ad68ee07 (patch) | |
tree | 48c6d2f2fa1771d600ff847b83755ea194858619 /lualib | |
parent | a69bdc3c0e6f52e1eeef5c2c284da1a3fb250c93 (diff) | |
download | rspamd-e7073a76bd2543beef76428b4662dbc9ad68ee07.tar.gz rspamd-e7073a76bd2543beef76428b4662dbc9ad68ee07.zip |
[Feature] Implement DKIM reputation adjustments
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_redis.lua | 5 | ||||
-rw-r--r-- | lualib/rspamd_config_transform.lua | 5 |
2 files changed, 6 insertions, 4 deletions
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 |