On 12/11/2015 10:42 PM, Marc Perkel wrote:

On 12/11/15 13:07, Axb wrote:
On 12/11/2015 09:57 PM, Marc Perkel wrote:
Trying to set up Bayes using redis.

I created a server for redis and have it running.

Can't finds the docs on how to create the databases initially and such.
And any tips appreciated.

Thanks in advance.


Did you look into the docs I put in

https://svn.apache.org/repos/asf/spamassassin/trunk/contrib/HOWTO.Bayes-Redis/
 ?

You don't have to "create" the DB - just look at the redis.conf sample...

The moment the redis server gets data, it will "autocreate" the first
database, which is the one you'll be using for Bayes.

Those little bits should get you going.

Definitely keep an eye on memory usage * 2

by tuning
bayes_token_ttl 30d
bayes_seen_ttl  14d
you can "tune usage"

IMPORTANT: If you want to do backup dumps of the DB you'll need twice
the amount of memory.
Redis starts a second server instance to do the dump which uses +- the
same amount of memory. So if you keep 4GB of Bayes in memory, you
should keep a bit more that 4GB free for the dump. IF the server
starts swapping during the dump you're shot.

You'll definitely want to do the dumps so BAyes survives reboots after
a a kernel update, for example.
During the reboot, the BAyes plugin will just timeout and log that it
can't connect to the servers. Looks worse thanit really is. When teh
server is available it reconnects automatically - no need for a spamd
reload/restart.

Enjoy


OK - I didn't think it was going to be that easy.

When you've setup the server...

spamassassin --lint -D bayes

should show you something like:

Dec 11 22:47:18.555 [12781] dbg: bayes: Redis on-connect, db_id 0
Dec 11 22:47:18.557 [12781] dbg: bayes: redis server version 3.0.2, memory used 3315.4 MiB, Lua is available
Dec 11 22:47:18.557 [12781] dbg: bayes: found bayes db version 3
Dec 11 22:47:18.557 [12781] dbg: bayes: defining Lua scripts
etc, etc



Reply via email to