[Rspamd-Users] replies module error "Attempt to perform arithmetic [on string]"
Gerald Galster
list+rspamd at gcore.biz
Wed Sep 11 18:44:21 UTC 2024
>>>>> I noticed an error ...
>>>>> ...
>>>>> call to (REPLIES_SET) failed (2):
>>>>> /usr/local/share/rspamd/plugins/replies.lua:276: attempt to perform
>>>>> arithmetic on field 'expire' (a string value); trace:
>>>>> [1]:{/usr/local/share/rspamd/plugins/replies.lua:276 - <unknown> [Lua]};
>>>>> Any ideas?
>>>> rspamadm configtest?
>>> (root at rivendell) 242# rspamadm configtest
>>> implicitly enabling luapattern returncodes_matcher for rule SH_EMAIL_ZRD
>>> implicitly enabling luapattern returncodes_matcher for rule SPAMHAUS_ZRD
>>> syntax OK
>> Have a look at https://rspamd.com/doc/modules/replies.html
>> If your config looks like that, create it from scratch (no copy & paste),
>> to rule out any invisible chars that might interfere.
>> Basically expire = 5d; is accepted here.
>
> Re-created the file from scratch, precisely the same error. Here's its hexdump (FreeBSD machine so line ends are proper):
IIRC sources are compiled via ports on FreeBSD. You could grab a tarball of
the original rspamd sources and diff the directory trees. If they match you
could look for lua/luajit versions.
I've verified that the following config works on Linux with rspamd 3.9 and
liblua 5.4:
# replies.conf
action = "no action";
expire = 5d;
key_prefix = "rr";
sender_prefix = "rsrk";
message = "Message is reply to one we originated";
symbol = "REPLY";
max_local_size = 20;
max_global_size = 30;
servers = "127.0.0.1:2240";
# rspamd log
(default: F (no action): [-4.00/9.00] [REPLY(-4.00){}, ...
forced: no action "Message is reply to one we originated"; score=nan (set by replies)
Best regards,
Gerald
More information about the Users
mailing list