[Rspamd-Users] WG: ratelimit - in which period is counted

Daniel, Sebastian s.daniel at q-mex.net
Wed Nov 2 11:17:03 UTC 2022


Hello,

I recently had the case that a local program emptied its mail queue.
There have accumulated about 2000 mails, which were fortunately all addressed to a local mailbox.

So it was sent from root at localhost to test at owndomain.com<mailto:test at owndomain.com>.

The rate limit however hit much too late. A burst of 80 is set, but 806 were delivered before the soft reject rejected the remaining 1194.

The rate limit works, because if I send emails by hand very diligently, it stops at 80 with further emails.

I suspect that the counter evaluation is too slow to limit bots that send as much per second as possible.

What am I doing wrong?

My Config:

rates {
user = {
    bucket = {
       burst = 80;
        rate = "1 / 30m";
    }
  }
to = {
    bucket = {
       burst = 80;
        rate = "1 / 30m";
    }
  }
bounce_to = {
    bucket = {
       burst = 40;
        rate = "1 / 2h";
    }
  }
from = {
    bucket = {
       burst = 80;
        rate = "1 / 30m";
    }
  }
}

Regards
Philipp


More information about the Users mailing list