aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/reputation.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-08-07 12:19:03 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-08-07 12:19:03 +0100
commit460a82484915f5fcbf34f65194c3437fa2a4e0c7 (patch)
tree6ef6f49a1061c73ac0520594eeadcbc3a3ed593d /src/plugins/lua/reputation.lua
parent662145d0554de5e769b92dab2d41173a98adcee5 (diff)
downloadrspamd-460a82484915f5fcbf34f65194c3437fa2a4e0c7.tar.gz
rspamd-460a82484915f5fcbf34f65194c3437fa2a4e0c7.zip
[Minor] Allow to log configuration errors from plugins
Diffstat (limited to 'src/plugins/lua/reputation.lua')
-rw-r--r--src/plugins/lua/reputation.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua
index 2fc1c3ad5..d569e9070 100644
--- a/src/plugins/lua/reputation.lua
+++ b/src/plugins/lua/reputation.lua
@@ -1377,8 +1377,11 @@ if opts['rules'] then
for k, v in pairs(opts['rules']) do
if not ((v or E).selector) then
rspamd_logger.errx(rspamd_config, "no selector defined for rule %s", k)
+ lua_util.push_config_error(N, "no selector defined for rule: " .. k)
else
- parse_rule(k, v)
+ if not parse_rule(k, v) then
+ lua_util.push_config_error(N, "reputation rule is misconfigured: " .. k)
+ end
end
end
else