diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-03 12:23:18 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-03 12:23:18 +0100 |
commit | cf13c6d210dfeab26634ab29bb2db2575882ebe0 (patch) | |
tree | 415fb55c9580391d5d13b9af80f723c6ef77dd5b /src/libstat/stat_process.c | |
parent | dfb304e588d9a34da9cad2cb5855efca40283b93 (diff) | |
download | rspamd-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.c | 5 |
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; |