[Rspamd-Users] rate limit: match multiple domains in one bucket

Yvan Masson yvan.masson at algoo.fr
Tue Jul 4 14:57:20 UTC 2023


Hi list,

In the rate limit module, I am trying to match multiple domains in one 
limit.

I first tried with a selector and a regexp but can not find the proper 
syntax of the "or" part (probably because it is a Lua regexp which can 
not "or" but I am not sure):

   selector = from('smtp'):domain.regexp("^(domain1.com|domain2.com)$")

Then I tried with a selector and the ".in()" transformation but again 
can not find the proper syntax:

   selector = from('smtp'):domain.in("domain1.com","domain2.com")

Is the above possible, or must I write a Lua "user-defined ratelimit" as 
written in the doc 
(https://rspamd.com/doc/modules/ratelimit.html#user-defined-ratelimits)?

Regards,
Yvan



More information about the Users mailing list