diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-10-16 16:53:13 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-10-16 16:53:13 +0400 |
commit | 8909ac45092c23bb6283ae389a5f6c94de49ad9d (patch) | |
tree | 0740f3a83d972ed52c89f31900cb9076a5449c20 /src/cfg_file.y | |
parent | 0ce0e854ccf8637f99370b9dd5c8322bd9ef9b76 (diff) | |
download | rspamd-8909ac45092c23bb6283ae389a5f6c94de49ad9d.tar.gz rspamd-8909ac45092c23bb6283ae389a5f6c94de49ad9d.zip |
* Add ability to skip check in views
Diffstat (limited to 'src/cfg_file.y')
-rw-r--r-- | src/cfg_file.y | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/cfg_file.y b/src/cfg_file.y index 85dcb9df5..6e0b8a20f 100644 --- a/src/cfg_file.y +++ b/src/cfg_file.y @@ -37,7 +37,7 @@ struct rspamd_view *cur_view = NULL; { char *string; size_t limit; - char flag; + gboolean flag; unsigned int seconds; unsigned int number; double fract; @@ -59,7 +59,7 @@ struct rspamd_view *cur_view = NULL; %token DELIVERY LMTP ENABLED AGENT SECTION LUACODE RAW_MODE PROFILE_FILE COUNT %token VIEW IP FROM SYMBOLS %token AUTOLEARN MIN_MARK MAX_MARK -%token SETTINGS USER_SETTINGS DOMAIN_SETTINGS SYMBOL PATH +%token SETTINGS USER_SETTINGS DOMAIN_SETTINGS SYMBOL PATH SKIP_CHECK %type <string> STRING %type <string> VARIABLE @@ -417,7 +417,7 @@ metricrjscore: } cur_metric->reject_score = $3; } - | REQUIRED_SCORE EQSIGN FRACT { + | REJECT_SCORE EQSIGN FRACT { if (cur_metric == NULL) { cur_metric = memory_pool_alloc0 (cfg->cfg_pool, sizeof (struct metric)); } @@ -995,6 +995,7 @@ viewcmd: | viewip | viewfrom | viewsymbols + | viewskipcheck ; viewip: @@ -1031,6 +1032,14 @@ viewsymbols: } } ; +viewskipcheck: + SKIP_CHECK EQSIGN FLAG { + if (cur_view == NULL) { + cur_view = init_view (cfg->cfg_pool); + } + cur_view->skip_check = $3; + } + ; settings: SETTINGS OBRACE settingsbody EBRACE |