summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-02-23 15:26:43 +0200
committerAndrew Lewis <nerf@judo.za.org>2017-02-23 15:26:43 +0200
commit5593d60f901f071e47b28fb850a37f603ddbe1d9 (patch)
treeb31680fc61efb5f2add3390e818c534a06df9097 /src/plugins/lua
parent79aac45aa30b25c61e13b75140ea4cd251d94378 (diff)
downloadrspamd-5593d60f901f071e47b28fb850a37f603ddbe1d9.tar.gz
rspamd-5593d60f901f071e47b28fb850a37f603ddbe1d9.zip
[Minor] Support setting `enabled = false` on RBLs
Diffstat (limited to 'src/plugins/lua')
-rw-r--r--src/plugins/lua/rbl.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 5fde08b69..ec1958fe1 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -439,6 +439,7 @@ end
-- Plugin defaults should not be changed - override these in config
-- New defaults should not alter behaviour
local default_defaults = {
+ ['default_enabled'] = {[1] = true, [2] = 'enabled'},
['default_ipv4'] = {[1] = true, [2] = 'ipv4'},
['default_ipv6'] = {[1] = false, [2] = 'ipv6'},
['default_received'] = {[1] = true, [2] = 'received'},
@@ -484,6 +485,7 @@ for key,rbl in pairs(opts['rbls']) do
rbl[default_v[2]] = opts[default]
end
end
+ if not rbl['enabled'] then return end
if type(rbl['returncodes']) == 'table' then
for s,_ in pairs(rbl['returncodes']) do
if type(rspamd_config.get_api_version) ~= 'nil' then