From 2697aa0d53a43ebfcad549c9cc47d68478de7291 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 15 Dec 2018 19:19:55 +0000 Subject: [Minor] Rbl: Fix various rework issues --- src/plugins/lua/rbl.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 869f12f77..4b6e8ab68 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -439,7 +439,7 @@ local function gen_rbl_callback(rule) -- Now check all DNS requests pending and emit them local r = task:get_resolver() - for name,p in ipairs(dns_req) do + for name,p in pairs(dns_req) do if validate_dns(p.n) then lua_util.debugm(N, task, "rbl %s; resolve %s -> %s", rule.symbol, name, p.n) @@ -577,14 +577,14 @@ local function add_rbl(key, rbl) table.insert(white_symbols, s) end else - if rbl.ignore_whitelists == false then + if rbl.ignore_whitelist == false then table.insert(black_symbols, s) end end end end - if not rbl.is_whitelist and rbl.ignore_whitelists == false then + if not rbl.is_whitelist and rbl.ignore_whitelist == false then table.insert(black_symbols, rbl.symbol) end -- Process monitored @@ -600,7 +600,7 @@ local function add_rbl(key, rbl) end end -for key,rbl in pairs(opts['rbls']) do +for key,rbl in pairs(opts.rbls or opts.rules) do if type(rbl) ~= 'table' or rbl.disabled == true or rbl.enabled == false then rspamd_logger.infox(rspamd_config, 'disable rbl "%s"', key) else -- cgit v1.2.3