[Rspamd-Users] Questions about REDIS and Bayes Learning

Tim Harman tim at muppetz.com
Fri Nov 16 00:39:37 UTC 2018


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. 


More information about the Users mailing list