aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-27 11:28:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-27 16:54:45 +0100
commit50466eddf26c21c999eb2065c49072e6012922a3 (patch)
tree1738e64e00376ce0f8070a1462e6bd650d81331d
parentc79bd8add22ce789f4b6a7660eaf53c9cf530a3c (diff)
downloadrspamd-50466eddf26c21c999eb2065c49072e6012922a3.tar.gz
rspamd-50466eddf26c21c999eb2065c49072e6012922a3.zip
[Minor] Rbl: Allow rules to ignore defaults
-rw-r--r--src/plugins/lua/rbl.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 4cafb0c87..00a35e1d7 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -850,10 +850,12 @@ for key,rbl in pairs(opts.rbls or opts.rules) do
rspamd_logger.infox(rspamd_config, 'disable rbl "%s"', key)
else
-- Propagate default options from opts to rule
- for default_opt_key,_ in pairs(default_options) do
- local rbl_opt = default_opt_key:sub(#('default_') + 1)
- if rbl[rbl_opt] == nil then
- rbl[rbl_opt] = opts[default_opt_key]
+ if not rbl.ignore_defaults then
+ for default_opt_key,_ in pairs(default_options) do
+ local rbl_opt = default_opt_key:sub(#('default_') + 1)
+ if rbl[rbl_opt] == nil then
+ rbl[rbl_opt] = opts[default_opt_key]
+ end
end
end