[Rspamd-Users] Questions about REDIS and Bayes Learning

Manuel Garbin manuel at studiostorti.com
Fri Nov 16 08:43:47 UTC 2018

Hi Tim,
autolearn will autofeed the bayes DB, that mean that you have 200+ learned.
For your question :

1) I've used same command to clean a redis cache, it works
2) disable autolearn if you want use manual learn
3) use header + body and remove the X-spam status header

----- Messaggio originale -----
Da: "Tim Harman via Users" <users at lists.rspamd.com>
A: "users at lists.rspamd.com" <users at lists.rspamd.com>
Cc: "Tim Harman" <tim at muppetz.com>
Inviato: Venerdì, 16 novembre 2018 1:39:37
Oggetto: [Rspamd-Users] Questions about REDIS and Bayes Learning


I am a new user to rspamd.  I'm only using it to manage a couple of
small domains that get ~100 emails (50% of which is spam) a day.  So far
I am very, very impressed!  My old solution of rbls in postfix,
greylising using GLD and then final scanning with SA has all been moved
aside for a single all-in-one-super-fast solution. 

Regardless, I've got the following questions: 

1) How can I reset bayes learning?  I'm still trialling rspamd, but when
I do move it into production I want to reset the database.  I'm using
redis and I found the following commands online, are they valid still? 

redis-cli KEYS *BAYES* | xargs redis-cli DEL 

redis-cli KEYS RS* | xargs redis-cli DEL 

2) I'm a little confused about the BAYES learning.  I have: 

root at micro:/etc/rspamd/local.d# cat classifier-bayes.conf
backend = "redis";
new_schema = true;
expire = 8640000;
autolearn = true; 

and in /etc/rspamd/statistic.conf I have min_learns = 200; (i.e. I
haven't edited it) 

But already I am seeing: 

BAYES_HAM (-3) [100.00%] 


BAYES_SPAM (5.1) [100.00%] 

in the logs for rspamd, but according to the rspamd GUI i've only learnt
60 messages.  Shouldn't bayes only start giving the messages a score
until that number is 200 of each? 

3) When I am using the web gui bayes ham/spam learning tool, what
exactly should I be pasting in there?  Just the message body?  Both the
body and the headers?  If the body+headers (as I have been) is it
bad/wrong if I also paste in the 'X-Spam: Yes' header or should I be
removing that? 

If these questions are answered in the docs already, please berate me. I
have looked them over 3-4 times now, but maybe I have missed them still,
in which case my apologies. 

FYI I am running: 

rspamd 1.8.1 (Debian 9.0 using the rspamd .deb files) 

postfix 3.1.8 

I am using local redis, I have DCC enabled. 

Users mailing list
Users at lists.rspamd.com

More information about the Users mailing list