From 7823e600341cf722a066858bc5400e5a6731bc98 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 18 Nov 2018 18:07:22 +0000 Subject: [Conf] Fix configuration sample for ratelimit --- conf/modules.d/ratelimit.conf | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/conf/modules.d/ratelimit.conf b/conf/modules.d/ratelimit.conf index 521bdb1a8..c7f415583 100644 --- a/conf/modules.d/ratelimit.conf +++ b/conf/modules.d/ratelimit.conf @@ -15,20 +15,23 @@ ratelimit { #rates { - # Limit for all mail per recipient (rate 2 per minute) - #to = "2 / 1min"; - # Limit for all mail per one source ip (rate 1.5 per minute) - #to_ip = "3 / 2min"; - # Limit for all mail per one source ip and from address (rate 1 per minute) - #to_ip_from = "1 / 1min"; - # Limit for all bounce mail (rate 2 per hour) - #bounce_to = "2 / 1h"; - # Limit for bounce mail per one source ip (rate 1 per hour) - #bounce_to_ip = "1 / 1h"; - # Limit for all mail per authenticated user (rate 1 per minute) - #user = "1 / 1min"; + # Predefined ratelimit + #to = { + # bucket = { + # burst = 100; + # rate = 0.01666666666666666666; # leak 1 message per minute + # } + #} + # or define it with selector + #other_limit_alt = { + # selector = 'rcpts:addr.take_n(5)'; + # bucket = { + # burst = 100; + # rate = "1 / 1m"; # leak 1 message per minute + # } + #} #} - # If symbol is specified, then it is inserted instead of setting result + # If symbol is specified, then it is inserted *instead* of setting result to soft reject #symbol = "R_RATELIMIT"; # If info_symbol is specified, then it is inserted next to set the result -- cgit v1.2.3