diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/task.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c index 6b349d359..63babf990 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -956,6 +956,9 @@ rspamd_learn_task_spam(struct rspamd_task *task, const char *classifier, GError **err) { + /* Disable learn auto flag to avoid bad learn codes */ + task->flags &= ~RSPAMD_TASK_FLAG_LEARN_AUTO; + if (is_spam) { task->flags |= RSPAMD_TASK_FLAG_LEARN_SPAM; } |