diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-15 19:19:55 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-15 19:19:55 +0000 |
commit | 2697aa0d53a43ebfcad549c9cc47d68478de7291 (patch) | |
tree | 7d5ed2368bc2c09c24e69e73c659055ec2c724c1 /src | |
parent | a5b96f1b715d8cf38822f8949cc9eb69a9b34966 (diff) | |
download | rspamd-2697aa0d53a43ebfcad549c9cc47d68478de7291.tar.gz rspamd-2697aa0d53a43ebfcad549c9cc47d68478de7291.zip |
[Minor] Rbl: Fix various rework issues
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/rbl.lua | 8 |
1 files changed, 4 insertions, 4 deletions
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 |