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

G.W. Haywood rspamd at jubileegroup.co.uk
Wed Sep 11 09:15:17 UTC 2024


Hi there,

On Tue, 10 Sep 2024, Steve Watt via Users wrote:
> On 2024-09-09 19:26, Gerald Galster wrote:
>> ...
>> Basically expire = 5d; is accepted here.
> ...
> Re-created the file from scratch, precisely the same error. ...
> ...
> Very puzzling. ...

Whenever I come across something which defies all my logic I usually
find that my logic is wrong and the problem isn't where I'm looking.
Error messages can be misleading.  I'm not saying that's necessarily
the case here but it could be starting to look that way.

My guess is that something somewhere else is tripping up whatever is
parsing the configuration *before* it reaches whatever it's actually
complaining about.  You'd probably want to say it's the fault of the
parser, but until you get right to the bottom of it you can't really
be sure.  Sometimes in programming you'll leave out a curly brace or
put in an extra one by accident and the error message will appear to
be a thousand lines away from the real error.  When you find it, you
realize that it's perfectly logical (and I'll usually kick myself).

I'd suggest *methodically* either making changes elsewhere which may
trip up the parser(s) before they reach your problem statment, or if
you can (preferably) rolling back the changes you've made one by one
until sanity returns, then moving forward in a different direction.

By *methodically* I mean don't make changes willy-nilly, so that you
end up with something from which you can never make sense or recover.
You need a base from which to work.  That should be in this case the
most recent good configuration if you have that available.

In this case if this single 'expire' line is the only problem, take
it out so that you'll be using the default.  If that's all it takes,
your system may be doing what you think it's doing or - even if you
see no error messages - it may not.  You need to find out if it is.

Is it behaving as if the default for 'expire' is in effect?  If not
then there may be another problem elsewhere which you need to fix.

My personal take on configuration is that I save every version that
I ever use, for ever and a week.  When something like this happens,
and sometimes the strangest things happen, I have a place to start.
That will very often be the previous configuration, but sometimes I
have to go back years to make sense of things.

Sorry this is all a bit general.

-- 

73,
Ged.


More information about the Users mailing list