From: Andrew Lewis Date: Wed, 13 Dec 2023 10:13:06 +0000 (+0200) Subject: [Minor] rbl: try harder to identify lua patterns X-Git-Tag: 3.8.0~35^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fb53d4f2fd85fda30e669ed580de19b84ee36925;p=rspamd.git [Minor] rbl: try harder to identify lua patterns --- diff --git a/lualib/plugins/rbl.lua b/lualib/plugins/rbl.lua index 7c5efb4cd..812407f4d 100644 --- a/lualib/plugins/rbl.lua +++ b/lualib/plugins/rbl.lua @@ -203,8 +203,8 @@ local function convert_checks(rule) 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.info(rspamd_config, 'implicitly enabling luapattern returncodes_matcher for rule %s', rule.symbol) + if e:find('%', 1, true) or e:find('[%.%d%x:]%[', 1, false) then + rspamd_logger.warn(rspamd_config, 'implicitly enabling luapattern returncodes_matcher for rule %s', rule.symbol) rule.returncodes_matcher = 'luapattern' break end