[Rspamd-Users] lua; lua_bayes_redis.lua:145: cannot get bayes statistics for BAYES_HAM: cannot upload script from file: bayes_stat.lua to any server

Michael Grimm trashcan at ellael.org
Thu Jun 26 06:17:35 UTC 2025


Gerald Galster <list+rspamd at gcore.biz> wrote:

>> [ FreeBSD stable/14-n271784 and rspamd 3.12.1 and keydb 6.3.4]
>> 
>> I find a lot of the following log lines starting with 3.12.1:
>> 
>> | lua; lua_bayes_redis.lua:145: cannot get bayes statistics for BAYES_HAM: cannot upload script from file: bayes_stat.lua to any server
>> | lua; lua_bayes_redis.lua:145: cannot get bayes statistics for BAYES_SPAM: cannot upload script from file: bayes_stat.lua to any server
>> 
>> [...]
>> 
>> BUT: 
>> 
>> 1) if I restart rspamd a second time after firing up my FreeBSD service jail
>> 
>> *or*
>> 
>> 2) if I do start keydb *before* starting rspamd
>> 
>> those messages stop appearing. Weird, dunno why.
> 
> Sounds similar to this thread:
> https://lists.rspamd.com/pipermail/users/2024-December/003604.html

Thanks for that. Sounds very similar, indeed.

>> Anyway: How can I silence these messages the correct way?
> 
> Try to ensure keydb is available before rspamd starts for the time being.

Ok, I decided to go for that solution and immediately found that rspamd needs to be started after redis as well ;-)

mail> cat /usr/local/etc/rc.d/rspamd 
...
# REQUIRE: LOGIN redis
...

FTR: Thus I just added 'keydb' for that requirement and solved my issue.

(I will open a PR for FreeBSD's port system soon)

Thanks and regards,
Michael



More information about the Users mailing list