[Rspamd-Users] replies module error "Attempt to perform arithmetic [on string]"

Steve Watt steve at watt.com
Wed Sep 11 04:21:21 UTC 2024


On 2024-09-09 19:26, Gerald Galster wrote:
>>>> 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):

00000000  23 20 77 68 69 74 65 6c  69 73 74 20 6d 65 73 73  |# whitelist 
mess|
00000010  61 67 65 73 20 66 72 6f  6d 20 74 68 72 65 61 64  |ages from 
thread|
00000020  73 20 74 68 61 74 20 68  61 76 65 20 62 65 65 6e  |s that have 
been|
00000030  20 72 65 70 6c 69 65 64  20 74 6f 0a 0a 65 78 70  | replied 
to..exp|
00000040  69 72 65 20 3d 20 35 64  3b 0a 0a 61 63 74 69 6f  |ire = 
5d;..actio|
00000050  6e 20 3d 20 22 6e 6f 20  61 63 74 69 6f 6e 22 3b  |n = "no 
action";|
00000060  0a 73 65 72 76 65 72 73  20 3d 20 22 6c 6f 63 61  |.servers = 
"loca|
00000070  6c 68 6f 73 74 22 3b 0a                           |lhost";.|

Very puzzling. There is no overrides.d/replies.conf (just 
double-checked). I guess I'm going to need to learn a little more lua 
and have it spit out what type/value it thinks expire is.

-- 
Steve Watt   KD6GGD     PP-ASEL-IA   factories.words.yappy
Don't let your schooling get in the way of your education.


More information about the Users mailing list