aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_file.y
diff options
context:
space:
mode:
authorcebka@lenovo-laptop <cebka@lenovo-laptop>2010-01-13 16:35:17 +0300
committercebka@lenovo-laptop <cebka@lenovo-laptop>2010-01-13 16:35:17 +0300
commitfc70f10e7c2a7b0aeb5da7b28c64131b03538e76 (patch)
treeb1c8ad0c8772f035a4b2fe2fc5dd43dff439f927 /src/cfg_file.y
parentd544f1d5770f56bf8b2b75ca7a04ac5441069e68 (diff)
downloadrspamd-fc70f10e7c2a7b0aeb5da7b28c64131b03538e76.tar.gz
rspamd-fc70f10e7c2a7b0aeb5da7b28c64131b03538e76.zip
* Add ability to add normalizers for statfiles (custom functions written in lua or simple internal normalizer)
Diffstat (limited to 'src/cfg_file.y')
-rw-r--r--src/cfg_file.y13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cfg_file.y b/src/cfg_file.y
index 8c7f232b1..d5a008587 100644
--- a/src/cfg_file.y
+++ b/src/cfg_file.y
@@ -60,7 +60,7 @@ struct rspamd_view *cur_view = NULL;
%token VIEW IP FROM SYMBOLS CLIENT_IP
%token AUTOLEARN MIN_MARK MAX_MARK MAXFILES MAXCORE
%token SETTINGS USER_SETTINGS DOMAIN_SETTINGS SYMBOL PATH SKIP_CHECK GROW_FACTOR
-%token LOG_BUFFER DEBUG_IP
+%token LOG_BUFFER DEBUG_IP NORMALIZER
%type <string> STRING
%type <string> VARIABLE
@@ -769,6 +769,7 @@ statfile:
}
cur_classifier = check_classifier_cfg (cfg, cur_classifier);
cur_classifier->statfiles = g_list_prepend (cur_classifier->statfiles, cur_statfile);
+ cfg->statfiles = g_list_prepend (cfg->statfiles, cur_statfile);
cur_statfile = NULL;
}
;
@@ -787,6 +788,7 @@ statfilecmd:
| statfilebinlog
| statfilebinlogrotate
| statfilebinlogmaster
+ | statfilenormalizer
;
statfilesymbol:
@@ -1011,6 +1013,15 @@ statfilebinlogmaster:
}
;
+statfilenormalizer:
+ NORMALIZER EQSIGN QUOTEDSTRING {
+ if (!parse_normalizer (cfg, cur_statfile, $3)) {
+ yyerror ("cannot parse normalizer string: %s", $3);
+ YYERROR;
+ }
+ }
+ ;
+
statfile_pool_size:
STATFILE_POOL_SIZE EQSIGN SIZELIMIT {