diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-14 17:09:49 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-14 17:09:49 +0400 |
commit | 5f5254ff214fd77a6fdc8cce9269c29837fd162a (patch) | |
tree | 3a983e534528a76585baebdbf89cab2a245d0a97 /src/cfg_file.y | |
parent | a8cdd33ac7ee59e195dca03a395c264877ee5168 (diff) | |
download | rspamd-5f5254ff214fd77a6fdc8cce9269c29837fd162a.tar.gz rspamd-5f5254ff214fd77a6fdc8cce9269c29837fd162a.zip |
* Fix symbol planning, add cache_file directive to config file
* Fix some errors
Diffstat (limited to 'src/cfg_file.y')
-rw-r--r-- | src/cfg_file.y | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cfg_file.y b/src/cfg_file.y index af54a9fb4..7a2aa3cb7 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 FILTERS FACTORS METRIC NAME +%token FILTERS FACTORS METRIC NAME CACHE_FILE %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 @@ -362,6 +362,7 @@ metriccmd: | metricfunction | metricscore | metricclassifier + | metriccache ; metricname: @@ -416,6 +417,15 @@ metricclassifier: } ; +metriccache: + CACHE_FILE EQSIGN QUOTEDSTRING { + if (cur_metric == NULL) { + cur_metric = memory_pool_alloc0 (cfg->cfg_pool, sizeof (struct metric)); + } + cur_metric->cache_filename = memory_pool_strdup (cfg->cfg_pool, $3); + } + ; + factors: FACTORS OBRACE factorsbody EBRACE ; |