summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/dynamic_conf.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-24 08:11:58 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-24 08:11:58 +0100
commit36a9ae27c2b467d52ae9f5acd02a46b5014bbcf9 (patch)
treeff5083464c50e1242bb5ceb43d76354e114a1cfc /src/plugins/lua/dynamic_conf.lua
parent95e505ca74a350be7378e89a32420a3c237fade6 (diff)
downloadrspamd-36a9ae27c2b467d52ae9f5acd02a46b5014bbcf9.tar.gz
rspamd-36a9ae27c2b467d52ae9f5acd02a46b5014bbcf9.zip
[Feature] Add ability to enable/disable symbols via dynamic_conf
Diffstat (limited to 'src/plugins/lua/dynamic_conf.lua')
-rw-r--r--src/plugins/lua/dynamic_conf.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/lua/dynamic_conf.lua b/src/plugins/lua/dynamic_conf.lua
index e8c6c63f9..201e32363 100644
--- a/src/plugins/lua/dynamic_conf.lua
+++ b/src/plugins/lua/dynamic_conf.lua
@@ -138,6 +138,18 @@ local function apply_dynamic_conf(cfg, data)
if data['actions'] then
apply_dynamic_actions(cfg, data['actions'])
end
+
+ if data['symbols_enabled'] then
+ each(function(i, v)
+ cfg:enable_symbol(v)
+ end, data['symbols_enabled'])
+ end
+
+ if data['symbols_disabled'] then
+ each(function(i, v)
+ cfg:disable_symbol(v)
+ end, data['symbols_disabled'])
+ end
end
local function check_dynamic_conf(cfg, ev_base)