diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-13 20:54:13 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-13 20:54:13 +0400 |
commit | a8cdd33ac7ee59e195dca03a395c264877ee5168 (patch) | |
tree | 077413b678005aad4f66dbeae82a982cb71ce75f /src/cfg_file.y | |
parent | 74b38eb87d0ee6e401e06d8c604d55be2d93a1b2 (diff) | |
download | rspamd-a8cdd33ac7ee59e195dca03a395c264877ee5168.tar.gz rspamd-a8cdd33ac7ee59e195dca03a395c264877ee5168.zip |
* Rework the whole filters system
* Add metrics optimization and symbols cache
* Change all plugins
[DRAGONS]: not for production usage, some things are still not working!
Diffstat (limited to 'src/cfg_file.y')
-rw-r--r-- | src/cfg_file.y | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/src/cfg_file.y b/src/cfg_file.y index 1fdc7275f..af54a9fb4 100644 --- a/src/cfg_file.y +++ b/src/cfg_file.y @@ -49,7 +49,7 @@ struct rspamd_view *cur_view = NULL; %token READ_SERVERS WRITE_SERVER DIRECTORY_SERVERS MAILBOX_QUERY USERS_QUERY LASTLOGIN_QUERY %token MEMCACHED WORKER TYPE REQUIRE MODULE %token MODULE_OPT PARAM VARIABLE -%token HEADER_FILTERS MIME_FILTERS MESSAGE_FILTERS URL_FILTERS FACTORS METRIC NAME +%token FILTERS FACTORS METRIC NAME %token REQUIRED_SCORE FUNCTION FRACT COMPOSITES CONTROL PASSWORD %token LOGGING LOG_TYPE LOG_TYPE_CONSOLE LOG_TYPE_SYSLOG LOG_TYPE_FILE %token LOG_LEVEL LOG_LEVEL_DEBUG LOG_LEVEL_INFO LOG_LEVEL_WARNING LOG_LEVEL_ERROR LOG_FACILITY LOG_FILENAME @@ -84,10 +84,7 @@ command : | memcached | worker | require - | header_filters - | mime_filters - | message_filters - | url_filters + | filters | module_opt | variable | factors @@ -126,30 +123,9 @@ pidfile : ; -header_filters: - HEADER_FILTERS EQSIGN QUOTEDSTRING { - cfg->header_filters_str = memory_pool_strdup (cfg->cfg_pool, $3); - free ($3); - } - ; - -mime_filters: - MIME_FILTERS EQSIGN QUOTEDSTRING { - cfg->mime_filters_str = memory_pool_strdup (cfg->cfg_pool, $3); - free ($3); - } - ; - -message_filters: - MESSAGE_FILTERS EQSIGN QUOTEDSTRING { - cfg->message_filters_str = memory_pool_strdup (cfg->cfg_pool, $3); - free ($3); - } - ; - -url_filters: - URL_FILTERS EQSIGN QUOTEDSTRING { - cfg->url_filters_str = memory_pool_strdup (cfg->cfg_pool, $3); +filters: + FILTERS EQSIGN QUOTEDSTRING { + cfg->filters_str = memory_pool_strdup (cfg->cfg_pool, $3); free ($3); } ; @@ -372,6 +348,7 @@ metric: cur_metric->classifier = get_classifier ("winnow"); } g_hash_table_insert (cfg->metrics, cur_metric->name, cur_metric); + cfg->metrics_list = g_list_prepend (cfg->metrics_list, cur_metric); cur_metric = NULL; } ; |