diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-12-20 22:09:16 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-12-20 22:09:16 +0300 |
commit | b8211fbcc8f7de342d4a0176bedf182e1f37397d (patch) | |
tree | fb5922ce974af9572564f28eaf9ae8798b740e4c /src/cfg_utils.c | |
parent | 90b983f151edcb747b86363d30f2101a9b060045 (diff) | |
download | rspamd-b8211fbcc8f7de342d4a0176bedf182e1f37397d.tar.gz rspamd-b8211fbcc8f7de342d4a0176bedf182e1f37397d.zip |
* Introduce new system of configuration checks:
- now symbols inside metrics definition must be inside rules as well
- symbols may be virtual (e.g. when module can insert several symbols inside callback)
- symbols may be pure callbacks (when symbol's name is unknown and depends on conditions)
* Module 'emails' is removed as it is not used in the current rspamd
MANY fixes to sample config files
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r-- | src/cfg_utils.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c index 334283d22..2685d1281 100644 --- a/src/cfg_utils.c +++ b/src/cfg_utils.c @@ -983,6 +983,20 @@ check_modules_config (struct config_file *cfg) return res; } +static void +symbols_classifiers_callback (gpointer key, gpointer value, gpointer ud) +{ + struct config_file *cfg = ud; + + register_virtual_symbol (&cfg->cache, key, 1.0); +} + +void +insert_classifier_symbols (struct config_file *cfg) +{ + g_hash_table_foreach (cfg->classifiers_symbols, symbols_classifiers_callback, cfg); +} + /* * vi:ts=4 */ |