Re: [exim] ratelimit is counting wrong

Pàgina inicial
Delete this message
Reply to this message
Autor: Ted Cooper
Data:  
A: exim-users
Assumpte: Re: [exim] ratelimit is counting wrong
Marten Lehmann wrote:
> Hello,
>
> on our mailrelay, we are using this condition:
>
> ratelimit     = 
> ${lookup{$authenticated_id}lsearch*@{/etc/conf/ratelimits.txt}} / 1h / 
> per_rcpt / $authenticated_id

>
> Thus, each user should be possible to use the rcpt command the given
> number of times within one hour. Lets assume there is a value of 600. So
> it shouldn't make a difference wether the user is sending 600 emails
> within 30 seconds and not sending anything else within the same hour, or
> sending 10 emails per minute for one hour. Regrettably, sending emails
> to 600 targets within 30 seconds doesn't work. Sending 10 emails per
> minute does work. But users want to send bulk mailings within a short
> amount of time, so I really need 600 emails per minute, but on the other
> hand I don't want users to be able to send 36000 emails per hour.
>
> Why does exim calculate something instead of using my specified values?


It is using your values, but you seem to misunderstanding rate (or I am
.. someone smarter than me will point it out if I am wrong). A rate is a
X per Y, but if you don't have a period of Y you have to divide both
parts by Z to get to the fraction of Y worth of data you have available.

Let's take your example: 600/hour
There are 3600 second in an hour, and you want to look at 30 seconds
600     * 30
----           == 5 emails allowed in 30 seconds.
3600
This is the only rate with which exim can work with.


Perhaps you should look at "Ratelimit options for handing fast clients"
which allows for different behaviors for clients which exceed the limit.
http://docs.exim.org/current/spec_html/ch40.html#ratophanfas

--
The Exim Manual
http://www.exim.org/docs.html
http://docs.exim.org/current/