Browse Source
[Fix] Always set the unlearn flag when relearning
Treat relearning from ham to spam the same as relearning from spam to ham. `res` is only set to true if the mail is already learned.
pull/4930/head
aduernberger
1 month ago
No account linked to committer's email address
|
|
|
|
|
|
|
|
(task->flags & RSPAMD_TASK_FLAG_LEARN_SPAM) ? "spam" : "ham"); |
|
|
(task->flags & RSPAMD_TASK_FLAG_LEARN_SPAM) ? "spam" : "ham"); |
|
|
task->flags |= RSPAMD_TASK_FLAG_ALREADY_LEARNED; |
|
|
task->flags |= RSPAMD_TASK_FLAG_ALREADY_LEARNED; |
|
|
} |
|
|
} |
|
|
else if (val != 0) { |
|
|
|
|
|
|
|
|
else { |
|
|
/* Unlearn flag */ |
|
|
/* Unlearn flag */ |
|
|
task->flags |= RSPAMD_TASK_FLAG_UNLEARN; |
|
|
task->flags |= RSPAMD_TASK_FLAG_UNLEARN; |
|
|
} |
|
|
} |