diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-09-17 19:17:14 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 19:17:14 +0600 |
commit | 3dda59641af8826d50dd07bc82d67c9ffecef403 (patch) | |
tree | 59c47ac8e260cdac03431445879149c6bb472495 /lualib/lua_bayes_learn.lua | |
parent | f7cac80b96de3e6a49109602f9622d00c26b4ec9 (diff) | |
parent | 986814257147e9e79df032f5f157d90c0ee430e4 (diff) | |
download | rspamd-3dda59641af8826d50dd07bc82d67c9ffecef403.tar.gz rspamd-3dda59641af8826d50dd07bc82d67c9ffecef403.zip |
Merge branch 'master' into vstakhov-utf8-mime
Diffstat (limited to 'lualib/lua_bayes_learn.lua')
-rw-r--r-- | lualib/lua_bayes_learn.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lualib/lua_bayes_learn.lua b/lualib/lua_bayes_learn.lua index 82f044d7d..89470edba 100644 --- a/lualib/lua_bayes_learn.lua +++ b/lualib/lua_bayes_learn.lua @@ -76,6 +76,13 @@ exports.autolearn = function(task, conf) mime_rcpts) end + if not task:get_queue_id() then + -- We should skip messages that come from `rspamc` or webui as they are usually + -- not intended for autolearn at all + lua_util.debugm(N, task, 'no need to autolearn - queue id is missing') + return + end + -- We have autolearn config so let's figure out what is requested local verdict, score = lua_verdict.get_specific_verdict("bayes", task) local learn_spam, learn_ham = false, false |