aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/rbl.lua
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-09-01 17:25:12 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-09-01 17:25:12 +0200
commitf552edd887794a5086dcf93d36f8f82d83553196 (patch)
tree3e4073dbcd20744cb02caa51d8b12d6e451bcae0 /src/plugins/lua/rbl.lua
parent99c2eb287a15649c0dac67065b0254c2a94a768f (diff)
downloadrspamd-f552edd887794a5086dcf93d36f8f82d83553196.tar.gz
rspamd-f552edd887794a5086dcf93d36f8f82d83553196.zip
[Feature] Add common way to disable Lua modules
Diffstat (limited to 'src/plugins/lua/rbl.lua')
-rw-r--r--src/plugins/lua/rbl.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 13563f71b..d782d1c25 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -385,7 +385,10 @@ end
-- Configuration
local opts = rspamd_config:get_all_opt('rbl')
-if not opts or type(opts) ~= 'table' then
+if not (opts and type(opts) == 'table') then
+ rspamd_logger.info('Module is unconfigured')
+elseif opts['enabled'] == false then
+ rspamd_logger.info('Module is disabled')
return
end