How can I configure the anti-spam learning in Warden to use Redis for storing bayes data ?

Install Redis

For high volume servers we recommend switching from the default MySQL storage back end to the the Redis back end for bayes data. This allows spam training and bayes lookups to run in memory which makes it extremely fast. 

Important: It is up to you to secure your Redis installation. You should make sure that the Redis port 6379 is not exposed to the Internet. We recommend binding Redis to the IPv4 loopback interface 127.0.0.1 (normally this is done by default) and setting a password for it. Also Redis is an in memory storage engine so you must have the free memory available on the server. (A typical server will use under 100MB of bayes data while a really busy server could use over 1 GB of memory.)

RHEL/Centos/Cloudlinux/AlmaLinux

yum install redis
systemctl enable redis --now 

Debian/Ubuntu

apt-get install redis-server
systemctl enable redis-server --now 

Enable Redis in Warden

  1. Go to Warden -> Settings -> Learning Settings and change the Bayes store module option to Redis.
  2. Enter in the Redis password if you are using one in the Bayes SQL DSN.
  3. Enter in the Bayes Token TTL (The number of days before the entries expire). For low volume servers we recommend 180d (6 months). For high volume servers we recommend 90d (3 months).
  4. Press the update button to save your settings.

If everything is working you should see the Anti-spam learning dashboard widget reset to zero and it should increment throughout the day as the real-time learning, auto learning, and nightly training runs.

  • redis, learning, bayes, optimize, performance
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How can I change the interface language of the extension?

You can change the interface language under Settings -> Application Settings -> Locale...

How can I disable admin email notifications in Amavis?

Amavis has different default options for controlling where virus, spam, banned file attachments,...

Where are the configuration files for Warden located?

Centos/RHEL/CloudLinux/AlmaLinux Configuration files: // amavis (Content Filter Settings)...

How can I override the score for a specific rule in Warden?

To Override a Rule Score Navigate to Warden -> Rules -> Click on Add then select the...

How can I whitelist or blacklist a mail server from greylisting?

To Whitelist a Mail Server From Greylisting Navigate to Warden -> Settings ->...