Skip to content

rspamd: configure redis backend

symphorien requested to merge symphorien/nixos-mailserver:rspamd-redis into master

The sqlite backed is deprecated, and the redis backend is the default since rspamd 2.0.

Not having redis started results in such errors:

rspamd_redis_init: cannot init redis backend for BAYES_SPAM

To migrate the sqlite database, run

rspamadm statconvert --spam-db /var/lib/rspamd/bayes.spam.sqlite --ham-db /var/lib/rspamd/bayes.ham.sqlite -h 127.0.0.1:6379 --symbol-ham BAYES_HAM --symbol-spam BAYES_SPAM

The current module implements the recommended configuration that this utility prints out.

Without further intervention, rspamd uses the redis database at index 0. I don't know what that means, but I expect you must ensure nothing else uses database 0.

The above points probably should be added to some form of release notes. I couldn't find where they are, though.

Since rspamd is the default on NixOS 20.03, this should be merged before the next release.

Merge request reports