Describe the bug
If you activate spamtrap module in rspamd 2.6 on debian, bayes filter is not trained if you set action = "no action" explicitly
learn_spam = true;
enabled = true;
action = "no action";
score = 1.0;
map = file://$LOCAL_CONFDIR/local.d/spamtrap.map
Configure map with regex
/^[email protected]/
Send Mail to [email protected] and verify bayes learning in the WebUI
You will see in History that SPAMTRAP symbol is added to the mail
Bayes learns will not increase.
you can see in the logs
2020-10-11 22:28:58 #14557(normal) <61ddee>; task; rspamd_task_process: learn error: Cannot learn statistics when passthrough result has been set; not classified
Expected behavior
Bayes learns are increasing by 1 for each spamtrapped mail
Rspamd daemon version 2.6
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
CPU
Intel Xeon Processor (Skylake, IBRS)
If you comment the lines
The passthrough error is not logged, bayes learn works and you can see in the debug log of spamtrap
default: F (no action)
The documentation clearly states bayes learns should work with action and score set explicitly:
https://rspamd.com/doc/modules/spamtrap.html
It is working as intended. Bayes learning and many other things that rely on full message analysis are disabled if you set passthrough result.
Thank you for the clarification. I might propose a change in the documentation. What is the purpose of spamtrap module with defined action setting passthrough result, if the message is not learned as spam?
I agree, that this passthrough stuff might be confusing. I have one idea to improve it, so I would probably implement it at some point.
Thanks, I just stumbled across this. :-)
I have noticed that there are messages with SPAMTRAP symbol being rejected. If I set action = "no action" in spamtrap module, bayes is not being learned. How can I prevent rejection in some other way? It feels like rejecting spamtrapped mails kind of beats the purpose of a spamtrap address. Am I missing something?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
I agree, that this passthrough stuff might be confusing. I have one idea to improve it, so I would probably implement it at some point.