diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-01-19 21:01:10 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-01-19 21:06:09 +0000 |
commit | 5890935eb1daf595b9b42ac4b9182733985a3f99 (patch) | |
tree | 4d32ad581cad5b24f7184226deca42af070dc275 /src/plugins | |
parent | 79b0b67f2d3de46490876cfebf5dd0176bd025e1 (diff) | |
download | rspamd-5890935eb1daf595b9b42ac4b9182733985a3f99.tar.gz rspamd-5890935eb1daf595b9b42ac4b9182733985a3f99.zip |
[Minor] Rbl: Fix require symbols option
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/rbl.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 49b67221f..8c362add2 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -423,6 +423,12 @@ local function gen_rbl_callback(rule) return true end + local function check_required_symbols(task, _) + if rule.require_symbols then + return fun.all(function(sym) task:has_symbol(sym) end, rule.require_symbols) + end + end + local function check_user(task, _) if task:get_user() then return false @@ -741,7 +747,8 @@ local function gen_rbl_callback(rule) -- Create function pipeline depending on rbl settings local pipeline = { - is_alive, -- generic for all + is_alive, -- check monitored status + check_required_symbols -- if we have require_symbols then check those symbols } local description = { 'alive', |