diff options
author | Andrew Lewis <nerf@judo.za.org> | 2024-01-25 11:12:53 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2024-01-25 11:12:53 +0200 |
commit | 1ea7a0b88cb6905a101736ff9f1b4dfe0fadfb7d (patch) | |
tree | cc82c2a94501881157e7a35142f638308b4061ec /lualib | |
parent | b1299ac9108f4568959a2ef61d2f7992ee131c88 (diff) | |
download | rspamd-1ea7a0b88cb6905a101736ff9f1b4dfe0fadfb7d.tar.gz rspamd-1ea7a0b88cb6905a101736ff9f1b4dfe0fadfb7d.zip |
[Minor] rbl: fix warning
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/plugins/rbl.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lualib/plugins/rbl.lua b/lualib/plugins/rbl.lua index b5232a8b4..af5d6bd91 100644 --- a/lualib/plugins/rbl.lua +++ b/lualib/plugins/rbl.lua @@ -149,7 +149,7 @@ local rule_schema_tbl = { exclude_checks = ts.array_of(ts.one_of(lua_util.keys(check_types))):is_optional(), } -local function convert_checks(rule) +local function convert_checks(rule, name) local rspamd_logger = require "rspamd_logger" if rule.checks then local all_connfilter = true @@ -160,7 +160,7 @@ local function convert_checks(rule) if check_type.require_argument then if not rule[check] then rspamd_logger.errx(rspamd_config, 'rbl rule %s has check %s which requires an argument', - rule.symbol, check) + name, check) return nil end end @@ -173,12 +173,12 @@ local function convert_checks(rule) if not check_type then rspamd_logger.errx(rspamd_config, 'rbl rule %s has invalid check type: %s', - rule.symbol, check) + name, check) return nil end else rspamd_logger.infox(rspamd_config, 'disable check %s in %s: excluded explicitly', - check, rule.symbol) + check, name) end end rule.connfilter = all_connfilter @@ -196,7 +196,7 @@ local function convert_checks(rule) if not check_found then -- Enable implicit `from` check to allow upgrade rspamd_logger.warnx(rspamd_config, 'rbl rule %s has no check enabled, enable default `from` check', - rule.symbol) + name) rule.from = true end @@ -204,7 +204,7 @@ local function convert_checks(rule) for _, v in pairs(rule.returncodes) do for _, e in ipairs(v) do if e:find('[%%%[]') then - rspamd_logger.warn(rspamd_config, 'implicitly enabling luapattern returncodes_matcher for rule %s', rule.symbol) + rspamd_logger.warn(rspamd_config, 'implicitly enabling luapattern returncodes_matcher for rule %s', name) rule.returncodes_matcher = 'luapattern' break end |