aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
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/plugins
parent99caa38084aa41938b98918b9119a288a0aefcf5 (diff)
downloadrspamd-48c027506d6cf9496975f405f64f3c143a4c4290.tar.gz
rspamd-48c027506d6cf9496975f405f64f3c143a4c4290.zip
[Feature] Skip certain symbols from ANN classify
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/asn.lua2
-rw-r--r--src/plugins/lua/fann_redis.lua6
-rw-r--r--src/plugins/lua/history_redis.lua2
-rw-r--r--src/plugins/lua/mime_types.lua2
-rw-r--r--src/plugins/lua/ratelimit.lua5
-rw-r--r--src/plugins/lua/replies.lua4
-rw-r--r--src/plugins/lua/settings.lua4
7 files changed, 13 insertions, 12 deletions
diff --git a/src/plugins/lua/asn.lua b/src/plugins/lua/asn.lua
index e58f1be3b..0d103fc10 100644
--- a/src/plugins/lua/asn.lua
+++ b/src/plugins/lua/asn.lua
@@ -103,7 +103,7 @@ end
if configure_asn_module() then
local id = rspamd_config:register_symbol({
name = 'ASN_CHECK',
- type = 'prefilter',
+ type = 'prefilter,nostat',
callback = asn_check,
priority = 5,
})
diff --git a/src/plugins/lua/fann_redis.lua b/src/plugins/lua/fann_redis.lua
index dbb4955ef..a710ae264 100644
--- a/src/plugins/lua/fann_redis.lua
+++ b/src/plugins/lua/fann_redis.lua
@@ -879,7 +879,7 @@ else
})
local id = rspamd_config:register_symbol({
name = fann_symbol_spam,
- type = 'postfilter',
+ type = 'postfilter,nostat',
priority = 6,
callback = fann_scores_filter
})
@@ -891,7 +891,7 @@ else
})
rspamd_config:register_symbol({
name = fann_symbol_ham,
- type = 'virtual',
+ type = 'virtual,nostat',
parent = id
})
if opts['train'] then
@@ -909,7 +909,7 @@ else
end
rspamd_config:register_symbol({
name = 'FANN_VECTOR_PUSH',
- type = 'postfilter',
+ type = 'postfilter,nostat',
priority = 5,
callback = ann_push_vector
})
diff --git a/src/plugins/lua/history_redis.lua b/src/plugins/lua/history_redis.lua
index ad65184b9..002c74e55 100644
--- a/src/plugins/lua/history_redis.lua
+++ b/src/plugins/lua/history_redis.lua
@@ -219,7 +219,7 @@ if opts then
else
rspamd_config:register_symbol({
name = 'HISTORY_SAVE',
- type = 'postfilter',
+ type = 'postfilter,nostat',
callback = history_save,
priority = 150
})
diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua
index 469e0c72a..b90bcad01 100644
--- a/src/plugins/lua/mime_types.lua
+++ b/src/plugins/lua/mime_types.lua
@@ -248,7 +248,7 @@ if opts then
if map then
local id = rspamd_config:register_symbol({
callback = check_mime_type,
- type = 'callback'
+ type = 'callback,nostat'
})
rspamd_config:register_symbol({
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua
index 2c42c2876..c1d98d4aa 100644
--- a/src/plugins/lua/ratelimit.lua
+++ b/src/plugins/lua/ratelimit.lua
@@ -682,7 +682,7 @@ if opts then
rspamd_config:register_symbol({
name = 'RATELIMIT_CHECK',
callback = rate_test,
- type = 'prefilter',
+ type = 'prefilter,nostat',
priority = 4,
})
else
@@ -695,6 +695,7 @@ if opts then
local id = rspamd_config:register_symbol({
name = symbol,
callback = rate_test,
+ type = 'normal,nostat'
})
if use_ip_score then
rspamd_config:register_dependency(id, 'IP_SCORE')
@@ -702,7 +703,7 @@ if opts then
end
rspamd_config:register_symbol({
name = 'RATELIMIT_SET',
- type = 'postfilter',
+ type = 'postfilter,nostat',
priority = 5,
callback = rate_set,
})
diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua
index 2f24f67e9..39dfa1113 100644
--- a/src/plugins/lua/replies.lua
+++ b/src/plugins/lua/replies.lua
@@ -128,13 +128,13 @@ if opts then
else
rspamd_config:register_symbol({
name = 'REPLIES_SET',
- type = 'postfilter',
+ type = 'postfilter,nostat',
callback = replies_set,
priority = 5
})
local id = rspamd_config:register_symbol({
name = 'REPLIES_CHECK',
- type = 'prefilter',
+ type = 'prefilter,nostat',
callback = replies_check,
priority = 10
})
diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua
index 3e8b6d2af..8f75d15c3 100644
--- a/src/plugins/lua/settings.lua
+++ b/src/plugins/lua/settings.lua
@@ -644,7 +644,7 @@ if redis_section then
fun.each(function(id, h)
rspamd_config:register_symbol({
name = 'REDIS_SETTINGS' .. tostring(id),
- type = 'prefilter',
+ type = 'prefilter,nostat',
callback = gen_redis_callback(h, id),
priority = 10
})
@@ -664,7 +664,7 @@ end
rspamd_config:register_symbol({
name = 'SETTINGS_CHECK',
- type = 'prefilter',
+ type = 'prefilter,nostat',
callback = check_settings,
priority = 10
})