[Rspamd-Users] Ratelimits : predefined vs selectors

Mickaël Dequidt Mickael.Dequidt at ifremer.fr
Mon Sep 26 13:59:16 UTC 2022


Hello all,

I'm relatively new to rspamd, and currently working to migrate my mail 
server from another type of spam protection to this one.

I'm struggling with how to use ratelimits : I see that, according to 
official doc, the only predefined ratelimits are

>     bounce_to: limit bounces per recipient
>     bounce_to_ip: limit bounces per recipient per ip
>     to: limit per recipient
>     to_ip: limit per pair of recipient and sender’s IP address
>     to_ip_from: limit per triplet: recipient, sender’s envelope from and sender’s IP
>     user: limit per authenticated user (useful for outbound limits)

which leaves me to wonder : if I want to rate-limit by sending addresses 
(for example, in order to slow down a phishing tide sent from a single 
envelope from to multiple mailboxes on my server), I can't use the 
predefined ones, can I ?

If so, is it true to imagine that I need to define a limit by selector ? 
Something like

> limit_from = {
>       selector = 'smtp_from.lower';
>       bucket = {
>         burst = 50;
>         rate = "1 / 1m";
>       }
> }

In which case I would allow up to 50 messages to be successfully 
delivered, and then accept 1 message per minute and soft-reject the others ?

If not, is "from" a predefined ratelimit omitted from the doc ?

Many thanks,

-- 
Mickaël DEQUIDT
IFREMER - Service IRSI/RIC
Centre Ifremer Bretagne - ZI de la pointe du diable
CS 10070 - 29280 Plouzané
Tel : +33 (0)2 98 22 46 04 - Fax : +33 (0)2 98 22 46 47


More information about the Users mailing list