From 15e3f277fad7c692b641423b38d6b508b764a3f8 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Thu, 26 Oct 2023 08:40:00 +0200 Subject: [Minor] Reiterate on the previous changes - Demote message to info level - Name it returncodes_matcher for better specificity --- lualib/plugins/rbl.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lualib') diff --git a/lualib/plugins/rbl.lua b/lualib/plugins/rbl.lua index 89304baa0..320fd7725 100644 --- a/lualib/plugins/rbl.lua +++ b/lualib/plugins/rbl.lua @@ -107,7 +107,6 @@ local rule_schema_tbl = { ipv6 = ts.boolean:is_optional(), is_whitelist = ts.boolean:is_optional(), local_exclude_ip_map = ts.string:is_optional(), - matcher = ts.one_of { "equality", "glob", "luapattern", "radix", "regexp" }:is_optional(), monitored_address = ts.string:is_optional(), no_ip = ts.boolean:is_optional(), process_script = ts.string:is_optional(), @@ -131,6 +130,7 @@ local rule_schema_tbl = { return_codes = return_codes_schema:is_optional(), returnbits = return_bits_schema:is_optional(), returncodes = return_codes_schema:is_optional(), + returncodes_matcher = ts.one_of { "equality", "glob", "luapattern", "radix", "regexp" }:is_optional(), selector = ts.one_of { ts.string, ts.table }:is_optional(), selector_flatten = ts.boolean:is_optional(), symbol = ts.string:is_optional(), @@ -200,16 +200,16 @@ local function convert_checks(rule) rule.from = true end - if rule.returncodes and not rule.matcher then + if rule.returncodes and not rule.returncodes_matcher then for _, v in pairs(rule.returncodes) do for _, e in ipairs(v) do if e:find('%', 1, true) then - rspamd_logger.warnx(rspamd_config, 'implicitly enabling luapattern matcher for rule %s', rule.symbol) - rule.matcher = 'luapattern' + rspamd_logger.info(rspamd_config, 'implicitly enabling luapattern returncodes_matcher for rule %s', rule.symbol) + rule.returncodes_matcher = 'luapattern' break end end - if rule.matcher then + if rule.returncodes_matcher then break end end -- cgit v1.2.3