You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ratelimit.conf 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Please don't modify this file as your changes might be overwritten with
  2. # the next update.
  3. #
  4. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
  5. # parameters defined on the top level
  6. #
  7. # You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
  8. # parameters defined on the top level
  9. #
  10. # For specific modules or configuration you can also modify
  11. # '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
  12. # '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
  13. #
  14. # See https://rspamd.com/doc/tutorials/writing_rules.html for details
  15. ratelimit {
  16. #rates {
  17. # Predefined ratelimit
  18. #to = {
  19. # bucket = {
  20. # burst = 100;
  21. # rate = 0.01666666666666666666; # leak 1 message per minute
  22. # }
  23. #}
  24. # or define it with selector
  25. #other_limit_alt = {
  26. # selector = 'rcpts:addr.take_n(5)';
  27. # bucket = {
  28. # burst = 100;
  29. # rate = "1 / 1m"; # leak 1 message per minute
  30. # }
  31. #}
  32. #}
  33. # If symbol is specified, then it is inserted *instead* of setting result to soft reject
  34. #symbol = "R_RATELIMIT";
  35. # If info_symbol is specified, then it is inserted next to set the result
  36. #info_symbol = "R_RATELIMIT_INFO";
  37. whitelisted_rcpts = "postmaster,mailer-daemon";
  38. max_rcpt = 5;
  39. .include(try=true,priority=5) "${DBDIR}/dynamic/ratelimit.conf"
  40. .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/ratelimit.conf"
  41. .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/ratelimit.conf"
  42. }