diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-09-01 17:25:12 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-09-01 17:25:12 +0200 |
commit | f552edd887794a5086dcf93d36f8f82d83553196 (patch) | |
tree | 3e4073dbcd20744cb02caa51d8b12d6e451bcae0 /src/plugins/lua/maillist.lua | |
parent | 99c2eb287a15649c0dac67065b0254c2a94a768f (diff) | |
download | rspamd-f552edd887794a5086dcf93d36f8f82d83553196.tar.gz rspamd-f552edd887794a5086dcf93d36f8f82d83553196.zip |
[Feature] Add common way to disable Lua modules
Diffstat (limited to 'src/plugins/lua/maillist.lua')
-rw-r--r-- | src/plugins/lua/maillist.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/lua/maillist.lua b/src/plugins/lua/maillist.lua index 42cdc9176..96807cd3d 100644 --- a/src/plugins/lua/maillist.lua +++ b/src/plugins/lua/maillist.lua @@ -270,7 +270,12 @@ end -- Configuration -local opts = rspamd_config:get_all_opt('maillist')if opts then +local opts = rspamd_config:get_all_opt('maillist') +if opts then + if opts['enabled'] == false then + rspamd_logger.info('Module is disabled') + return + end if opts['symbol'] then symbol = opts['symbol'] rspamd_config:register_symbol({ |