]> source.dussan.org Git - rspamd.git/commitdiff
[Conf] Fix configuration sample for ratelimit
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 18 Nov 2018 18:07:22 +0000 (18:07 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 18 Nov 2018 18:07:22 +0000 (18:07 +0000)
conf/modules.d/ratelimit.conf

index 521bdb1a8869c2726a5b10ba0b1e3ed56d374c43..c7f4155835adc918eeb324e19a15334403b6497d 100644 (file)
 
 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