diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-07 18:40:50 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-07 18:40:50 +0100 |
commit | 5ef40cdc6f33d58f2cff3b68cc7a83cb4adaa25c (patch) | |
tree | 83fcae9546e2023ee39d5421c9961c81d0a41008 /src/libserver/cfg_rcl.c | |
parent | ace1f3025421e5a785a36cce6ef504eea608e980 (diff) | |
download | rspamd-5ef40cdc6f33d58f2cff3b68cc7a83cb4adaa25c.tar.gz rspamd-5ef40cdc6f33d58f2cff3b68cc7a83cb4adaa25c.zip |
Add some human readable aliases for rspamd configuration options.
Diffstat (limited to 'src/libserver/cfg_rcl.c')
-rw-r--r-- | src/libserver/cfg_rcl.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index 5869bd6fb..7c898431f 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -631,6 +631,10 @@ rspamd_rcl_worker_handler (rspamd_mempool_t *pool, const ucl_object_t *obj, } val = ucl_object_find_key (obj, "bind_socket"); + /* This name is more logical */ + if (val == NULL) { + val = ucl_object_find_key (obj, "listen"); + } if (val != NULL) { it = ucl_object_iterate_new (val); while ((cur = ucl_object_iterate_safe (it, true)) != NULL) { @@ -1271,6 +1275,11 @@ rspamd_rcl_config_init (void) G_STRUCT_OFFSET (struct rspamd_config, nameservers), 0); rspamd_rcl_add_default_handler (ssub, + "server", + rspamd_rcl_parse_struct_string_list, + G_STRUCT_OFFSET (struct rspamd_config, nameservers), + 0); + rspamd_rcl_add_default_handler (ssub, "timeout", rspamd_rcl_parse_struct_time, G_STRUCT_OFFSET (struct rspamd_config, dns_timeout), @@ -1285,6 +1294,11 @@ rspamd_rcl_config_init (void) rspamd_rcl_parse_struct_integer, G_STRUCT_OFFSET (struct rspamd_config, dns_io_per_server), RSPAMD_CL_FLAG_INT_32); + rspamd_rcl_add_default_handler (ssub, + "connections", + rspamd_rcl_parse_struct_integer, + G_STRUCT_OFFSET (struct rspamd_config, dns_io_per_server), + RSPAMD_CL_FLAG_INT_32); /* New upstreams configuration */ ssub = rspamd_rcl_add_section (&sub->subsections, "upstream", NULL, @@ -1374,6 +1388,11 @@ rspamd_rcl_config_init (void) G_STRUCT_OFFSET (struct rspamd_config, check_all_filters), 0); rspamd_rcl_add_default_handler (sub, + "all_filters", + rspamd_rcl_parse_struct_boolean, + G_STRUCT_OFFSET (struct rspamd_config, check_all_filters), + 0); + rspamd_rcl_add_default_handler (sub, "min_word_len", rspamd_rcl_parse_struct_integer, G_STRUCT_OFFSET (struct rspamd_config, min_word_len), @@ -1383,6 +1402,11 @@ rspamd_rcl_config_init (void) rspamd_rcl_parse_struct_string, G_STRUCT_OFFSET (struct rspamd_config, tld_file), RSPAMD_CL_FLAG_STRING_PATH); + rspamd_rcl_add_default_handler (sub, + "tld", + rspamd_rcl_parse_struct_string, + G_STRUCT_OFFSET (struct rspamd_config, tld_file), + RSPAMD_CL_FLAG_STRING_PATH); /** * Metric section |