Rspamd Notes
This document concerns Rspamd, Fast, free and open-source spam filtering system.
Howto Learn Spam
Rspamd uses its own Bayes filter implementation, so you cannot copy bogofilter or spamassassin database. But you can train database from the spam emails. Rspamd cannot unlearn, but can reclassify.
rspamc learn_spam /srv/vmail/domain.tld/user/Maildir/.INBOX.spamtotrain/cur
Check Configuration
You should check configuration after making changes since Rspamd won’t fail on local.d invalid overrides.
rspamadm configtest
“all learn conditions denied learning spam in default classifier”
The message “all learn conditions denied learning spam in default classifier” while trying to learn spam is generic error message, caused by various conditions and causes. In my case I had invalid redis configuration. See check configuration.
{
"error": "all learn conditions denied learning spam in default classifier",
"filename": "/srv/vmail/myrtana.sk/user/Maildir/.INBOX.spamnatrenovanie/cur//1693237172.M185431P813972.starz,S=166835,W=169041:2,S",
"scan_time": 0.022001
}
2024-05-08 21:24:37 #182471(controller) <c420cb>; csession; rspamd_stat_classifiers_process: skip statistics as SPAM class is missing
2024-05-08 21:24:37 #182471(controller) <c420cb>; csession; rspamd_task_process: skip learning: all learn conditions denied learning spam in default classifier
2024-05-08 21:24:37 #182471(controller) <c420cb>; csession; rspamd_controller_learn_fin_task: cannot learn <715102624380737608820043467528345220548544662240@varuma.name.tr>: all learn conditions denied learning spam in default classifier
After I fixed my configuration, it worked:
{
"success": true,
"filename": "/srv/vmail/myrtana.sk/user/Maildir/.INBOX.spamnatrenovanie/cur//1693237172.M185431P813972.starz,S=166835,W=169041:2,S",
"scan_time": 0.011000
}
spf error for domain $domain: cannot resolve AAAA record for $domain: requested record is not found
2024-05-12 12:10:49 #317270(normal) <b6333d>; spf; spf_record_dns_callback: spf error for domain vpsfree.cz: cannot resolve AAAA record for vpsfree.cz: requested record is not found
Not sure, there are like 3 results for the exact query. But there is this bug which says AAAA records are not handled by spf - https://github.com/rspamd/rspamd/issues/4207.
And that’s all.
Add Comment