aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_config.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-29 15:31:44 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-29 15:31:44 +0100
commit48c027506d6cf9496975f405f64f3c143a4c4290 (patch)
treea48c6fc20f755f612947e4db6e455b8a40f20cb3 /src/lua/lua_config.c
parent99caa38084aa41938b98918b9119a288a0aefcf5 (diff)
downloadrspamd-48c027506d6cf9496975f405f64f3c143a4c4290.tar.gz
rspamd-48c027506d6cf9496975f405f64f3c143a4c4290.zip
[Feature] Skip certain symbols from ANN classify
Diffstat (limited to 'src/lua/lua_config.c')
-rw-r--r--src/lua/lua_config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index 398c9ed34..7423bdaeb 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -191,6 +191,7 @@ LUA_FUNCTION_DEF (config, get_classifier);
* + `nice` if symbol can produce negative score;
* + `empty` if symbol can be called for empty messages
* + `skip` if symbol should be skipped now
+ * + `nostat` if symbol should be excluded from stat tokens
* - `parent`: id of parent symbol (useful for virtual symbols)
*
* @return {number} id of symbol registered
@@ -1421,6 +1422,9 @@ lua_parse_symbol_flags (const gchar *str)
if (strstr (str, "skip") != NULL) {
ret |= SYMBOL_TYPE_SKIPPED;
}
+ if (strstr (str, "nostat") != NULL) {
+ ret |= SYMBOL_TYPE_NOSTAT;
+ }
}
return ret;