]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Ignore lua metatokens in bayes for now
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 14 Feb 2017 13:37:01 +0000 (13:37 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 14 Feb 2017 13:37:18 +0000 (13:37 +0000)
src/libstat/classifiers/bayes.c

index 98b3fd6ca9f3e31d75a5adff6dfbdefc879e9327..fb1ffdde2d3b2fcd1f4c6989092220442606e014 100644 (file)
@@ -112,6 +112,11 @@ bayes_classify_token (struct rspamd_classifier *ctx,
 
        task = cl->task;
 
+       if (tok->flags & RSPAMD_STAT_TOKEN_FLAG_LUA_META) {
+               /* Ignore lua metatokens for now */
+               return;
+       }
+
        for (i = 0; i < ctx->statfiles_ids->len; i++) {
                id = g_array_index (ctx->statfiles_ids, gint, i);
                st = g_ptr_array_index (ctx->ctx->statfiles, id);