diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2008-12-10 20:03:00 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2008-12-10 20:03:00 +0300 |
commit | 93e2e9d2faf9495283b2709f8749d81542d21ed1 (patch) | |
tree | 72817ab774cd081b2687c914f08b2bcd96432175 /src/controller.c | |
parent | c9df6177c0b5f8fb5bd2c6c4947c52e184b0b556 (diff) | |
download | rspamd-93e2e9d2faf9495283b2709f8749d81542d21ed1.tar.gz rspamd-93e2e9d2faf9495283b2709f8749d81542d21ed1.zip |
* Add logic for filtering messages with tokenizer/classifier pair
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/controller.c b/src/controller.c index fa2fa268f..4369f7d7f 100644 --- a/src/controller.c +++ b/src/controller.c @@ -235,8 +235,8 @@ process_command (struct controller_command *cmd, char **cmd_args, struct control session->learn_rcpt = NULL; session->learn_from = NULL; session->learn_filename = NULL; - session->learn_tokenizer = get_tokenizer ("osb-text"); - session->learn_classifier = get_classifier ("winnow"); + session->learn_tokenizer = statfile->tokenizer; + session->learn_classifier = statfile->classifier; /* By default learn positive */ session->in_class = 1; /* Get all arguments */ @@ -262,22 +262,6 @@ process_command (struct controller_command *cmd, char **cmd_args, struct control } session->learn_from = memory_pool_strdup (session->session_pool, arg); break; - case 't': - arg = *(cmd_args + 1); - if (!arg || *arg == '\0' || (session->learn_tokenizer = get_tokenizer (arg)) == NULL) { - r = snprintf (out_buf, sizeof (out_buf), "tokenizer is not defined" CRLF, arg); - bufferevent_write (session->bev, out_buf, r); - return; - } - break; - case 'c': - arg = *(cmd_args + 1); - if (!arg || *arg == '\0' || (session->learn_classifier = get_classifier (arg)) == NULL) { - r = snprintf (out_buf, sizeof (out_buf), "classifier is not defined" CRLF, arg); - bufferevent_write (session->bev, out_buf, r); - return; - } - break; case 'n': session->in_class = 0; break; |