From: Vsevolod Stakhov Date: Mon, 20 Apr 2020 15:22:54 +0000 (+0100) Subject: [Minor] Add more whitelists debugging X-Git-Tag: 2.6~510 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=447681fc808436f82b76016b8212697400843094;p=rspamd.git [Minor] Add more whitelists debugging --- diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 1e339b1f5..44d718d9e 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -282,7 +282,12 @@ end local function gen_rbl_callback(rule) local function is_whitelisted(task, req, req_str, whitelist, what) - if rule.ignore_whitelist then return false end + if rule.ignore_whitelist then + lua_util.debugm(N, task, + 'ignore whitelisting checks to %s by %s: ignore whitelist is being set', + req_str, rule.symbol) + return false + end if rule.whitelist then if rule.whitelist:get_key(req) then @@ -951,6 +956,10 @@ local function add_rbl(key, rbl, global_opts) end if not rbl.is_whitelist and rbl.ignore_whitelist == false then table.insert(black_symbols, rbl.symbol .. '_CHECK') + else + lua_util.debugm(N, rspamd_config, 'rule %s ignores whitelists: rbl.is_whitelist = %s, ' .. + 'rbl.ignore_whitelist = %s', + rbl.symbol, rbl.is_whitelist, rbl.ignore_whitelist) end else id = rspamd_config:register_symbol{