[exim] Basic RateLimit question..

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: B. Cook
Data:  
Para: Exim users list
Assunto: [exim] Basic RateLimit question..
I've been trying to make this happen and I can't seem to get it.. so I'm
wondering what I'm doing wrong..

I'm trying to just figure out how rate limiting works.. I have this:

warn
#message = sorry, too busy. Try again later. [You are Deferred]
ratelimit = 0 / 1m / strict
log_message = [RateLimited] $sender_host_address / $sender_rate /
$sender_rate_period / $sender_rate_limit

This seems to work I get things like this:

2006-10-10 15:09:10 H=[89.169.189.162]:2494 I=[1.2.3.4]:25 Warning:
[RateLimited] 89.169.189.162 / 0.0 / 1m / 0
2006-10-10 15:09:11 H=[201.29.190.202]:2119 I=[1.2.3.4]:25 Warning:
[RateLimited] 201.29.190.202 / 0.0 / 1m / 0
2006-10-10 15:09:11 H=[86.219.41.118]:3154 I=[1.2.3.4]:25 Warning:
[RateLimited] 86.219.41.118 / 0.0 / 1m / 0
2006-10-10 15:09:11 H=[86.219.41.118]:3155 I=[1.2.3.4]:25 Warning:
[RateLimited] 86.219.41.118 / 1.0 / 1m / 0
2006-10-10 15:09:12 H=[72.131.8.32]:7706 I=[1.2.3.4]:25 Warning:
[RateLimited] 72.131.8.32 / 0.0 / 1m / 0
2006-10-10 15:09:12 H=[24.216.69.144]:62781 I=[1.2.3.4]:25 Warning:
[RateLimited] 24.216.69.144 / 0.0 / 1m / 0
2006-10-10 15:09:12 H=[85.81.61.60]:54841 I=[1.2.3.4]:25 Warning:
[RateLimited] 85.81.61.60 / 0.3 / 1m / 0
2006-10-10 15:09:15 H=[208.49.63.217]:34643 I=[1.2.3.4]:25 Warning:
[RateLimited] 208.49.63.217 / 0.0 / 1m / 0
2006-10-10 15:09:15 H=[200.21.234.18]:1072 I=[1.2.3.4]:25 Warning:
[RateLimited] 200.21.234.18 / 0.0 / 1m / 0
2006-10-10 15:09:17 H=[213.215.100.135]:2446 I=[1.2.3.4]:25 Warning:
[RateLimited] 213.215.100.135 / 0.0 / 1m / 0
2006-10-10 15:09:18 H=[80.105.199.26]:2992 I=[1.2.3.4]:25 Warning:
[RateLimited] 80.105.199.26 / 2.5 / 1m / 0
2006-10-10 15:09:18 H=[80.105.199.26]:3005 I=[1.2.3.4]:25 Warning:
[RateLimited] 80.105.199.26 / 3.5 / 1m / 0
2006-10-10 15:09:18 H=[129.44.180.126]:50198 I=[1.2.3.4]:25 Warning:
[RateLimited] 129.44.180.126 / 0.0 / 1m / 0
2006-10-10 15:09:18 H=[129.44.180.126]:50199 I=[1.2.3.4]:25 Warning:
[RateLimited] 129.44.180.126 / 1.0 / 1m / 0
2006-10-10 15:09:19 H=[80.144.170.170]:15791 I=[1.2.3.4]:25 Warning:
[RateLimited] 80.144.170.170 / 1.9 / 1m / 0
2006-10-10 15:09:20 H=[80.130.101.176]:3481 I=[1.2.3.4]:25 Warning:
[RateLimited] 80.130.101.176 / 0.0 / 1m / 0
2006-10-10 15:09:20 H=[90.0.11.172]:2379 I=[1.2.3.4]:25 Warning:
[RateLimited] 90.0.11.172 / 0.0 / 1m / 0
2006-10-10 15:09:20 H=[64.187.99.44]:8317 I=[1.2.3.4]:25 Warning:
[RateLimited] 64.187.99.44 / 0.0 / 1m / 0
2006-10-10 15:09:21 H=[84.61.57.163]:12803 I=[1.2.3.4]:25 Warning:
[RateLimited] 84.61.57.163 / 0.0 / 1m / 0

What I'm wondering.. is if I can rate limit by cidr..

I see the example here:
http://exim.org/exim-html-4.62/doc/html/spec_html/ch39.html#SECTratelimiting

# Restrict incoming rate from each host, with a default
# set using a macro and special cases looked up in a table.
defer
   message = Sender rate exceeds $sender_rate_limit \
             messages per $sender_rate_period
   ratelimit = ${lookup {$sender_host_address} \
                 cdb {DB/ratelimits.cdb} \
                 {$value} {RATELIMIT} }


what does that look like? Whats in that ratelimits.cdb and what is
RATELIMIT