aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-19 09:31:14 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-19 09:32:17 +0100
commitad086586a46cd1bd73002643351d04131949b4cd (patch)
treefdb9178d7530ce3b5a7668d2d6b53f95b467c059
parentfd5350785776313439fc4104084549d65605478d (diff)
downloadrspamd-ad086586a46cd1bd73002643351d04131949b4cd.tar.gz
rspamd-ad086586a46cd1bd73002643351d04131949b4cd.zip
[Minor] Rbl: Improve WL logging
-rw-r--r--src/plugins/lua/rbl.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 418c174ba..7d9b9f71b 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -824,7 +824,8 @@ local function add_rbl(key, rbl, global_opts)
if ret then
rbl.process_script = f
else
- rspamd_logger.errx('invalid process script for rbl rule %s: %s; %s',
+ rspamd_logger.errx(rspamd_config,
+ 'invalid process script for rbl rule %s: %s; %s',
key, rbl.process_script, f)
return false
end
@@ -837,13 +838,18 @@ local function add_rbl(key, rbl, global_opts)
end
rbl.whitelist = lua_maps.map_add_from_ucl(rbl.whitelist, def_type,
'RBL whitelist for ' .. rbl.symbol)
+ rspamd_logger.infox(rspamd_config, 'added %s whitelist for RBL %s',
+ def_type, rbl.symbol)
end
if not rbl.whitelist and global_opts.url_whitelist and
- (rbl.urls or rbl.emails or rbl.dkim or rbl.replyto) then
+ (rbl.urls or rbl.emails or rbl.dkim or rbl.replyto) and
+ not (rbl.from or rbl.received) then
local def_type = 'set'
rbl.whitelist = lua_maps.map_add_from_ucl(global_opts.url_whitelist, def_type,
'RBL url whitelist for ' .. rbl.symbol)
+ rspamd_logger.infox(rspamd_config, 'added URL whitelist for RBL %s',
+ rbl.symbol)
end
local callback,description = gen_rbl_callback(rbl)