aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_process.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-03 12:23:18 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-03 12:23:18 +0100
commitcf13c6d210dfeab26634ab29bb2db2575882ebe0 (patch)
tree415fb55c9580391d5d13b9af80f723c6ef77dd5b /src/libstat/stat_process.c
parentdfb304e588d9a34da9cad2cb5855efca40283b93 (diff)
downloadrspamd-cf13c6d210dfeab26634ab29bb2db2575882ebe0.tar.gz
rspamd-cf13c6d210dfeab26634ab29bb2db2575882ebe0.zip
[Feature] Allow setting scores and actions from lua
Diffstat (limited to 'src/libstat/stat_process.c')
-rw-r--r--src/libstat/stat_process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c
index 1c8fbf070..78166906f 100644
--- a/src/libstat/stat_process.c
+++ b/src/libstat/stat_process.c
@@ -793,7 +793,10 @@ rspamd_stat_check_autolearn (struct rspamd_task *task)
mres = g_hash_table_lookup (task->results, DEFAULT_METRIC);
if (mres) {
- mres->action = rspamd_check_action_metric (task, mres);
+
+ if (mres->action == METRIC_ACTION_MAX) {
+ mres->action = rspamd_check_action_metric (task, mres);
+ }
if (mres->action == METRIC_ACTION_REJECT) {
task->flags |= RSPAMD_TASK_FLAG_LEARN_SPAM;