[Rspamd-Users] Regexp rules in maps or somewhere else

Vsevolod Stakhov vsevolod at rspamd.com
Sat Sep 30 14:21:40 UTC 2023


On 30/09/2023 15:03, G.W. Haywood via Users wrote:
> Hi there,
> 
> On Sat, 30 Sep 2023, Peter Reinhold wrote:
>> On 2023-09-30 10:32, G.W. Haywood via Users wrote:
>>> On Sat, 30 Sep 2023, Peter Reinhold wrote:
>>>
>>>> ... I would like to be able to add, delete and modify these rules a 
>>>> bit easier than editing a textfile and reloading rspamd.
>>>> ...
>>>
>>> Could you describe what would be a bit easier for you?
>>>
>>> For example are you thinking of something with a GUI?
>>
>> I'm mostly looking for functionality that mimics a map, something that 
>> rspamd automatically reloads when it changes, be it a file, web, 
>> database or ...
> 
> I'm not sure that I understand what you mean by functionality that
> mimics a map.  If this is not just about automatic reload, can you
> please elaborate?
> 
> I'm not sure I understand why automatic reload would be so important
> to you, but if I wanted to arrange that for anything I'd set up a cron
> job which ran every X minutes and checked the timestamp(s) on any file
> which might need to be reloaded.  If it found a timestamp younger than
> (for example to avoid race conditions) X+2 minutes old, then run the
> reload command and sleep for three minutes.  It can log errors etc. as
> well - this is roughly the sort of thing I do with Yara rules.
> 
> Would something like that be acceptable?
> 


In fact, Rspamd multimap plugin can now use `dynamic_symbols` so it can 
insert new symbols that are not in the static configuration.

Dynamic loading of lua files is dangerous and is almost ultimately a bad 
idea in general indeed (`halting problem` comes first out of my mind here).


More information about the Users mailing list