aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-12-22 12:17:36 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-12-22 12:17:36 +0200
commit57136d98d8998dfab369d7d500a4d73284be9db9 (patch)
treed326180be614131b7f827bff40f35837dffa1c59 /src/libserver
parentb75412f4eb755a236d8db83cf44d569c5aaf0aba (diff)
downloadrspamd-57136d98d8998dfab369d7d500a4d73284be9db9.tar.gz
rspamd-57136d98d8998dfab369d7d500a4d73284be9db9.zip
[Feature] Add mechanism for disabling composites (Fixes #1270)
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/cfg_rcl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index 6f9e66d5c..dfd1b4c0a 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -1414,6 +1414,12 @@ rspamd_rcl_composite_handler (rspamd_mempool_t *pool,
composite_name = key;
+ val = ucl_object_lookup (obj, "enabled");
+ if (val != NULL && !ucl_object_toboolean (val)) {
+ msg_info_config ("composite %s is disabled", composite_name);
+ return TRUE;
+ }
+
if (g_hash_table_lookup (cfg->composite_symbols, composite_name) != NULL) {
msg_warn_config ("composite %s is redefined", composite_name);
new = FALSE;