Re: [exim] delay with ratelimit

Página Inicial
Delete this message
Reply to this message
Autor: Bill Hacker
Data:  
Para: exim
Assunto: Re: [exim] delay with ratelimit
Kerstin Espey wrote:

> Hi,
>
> I have updated to exim 4.60 for the use of the ratelimit condition. Reading
> the spec.txt, I found this example:
>
> # Slow down fast senders
> warn
>   ratelimit = 100 / 1h / per_rcpt / strict
>   delay     = ${eval: $sender_rate - $sender_rate_limit }s

>
> I can't get this working, because $sender_rate is not an integer but something
> like 5.9, which does not work at my side:
>
> exim -be '${eval:5.4-4}'
> Failed: error in expression evaluation: expecting + or - (after processing
> "5")
>
> Is there any chance to get this working?


Same historical issue with decimal-fraction SA scores is solved by:

     condition   = ${if >{$spam_score_int}{30}{1}{0}}


Working, (in production), as it were, with the int of the decimal
fraction times ten.

i.e your 5.4 => 54 and 5.9 => 59

Should be adaptable from: (not tested)....

condition = ${if >{$sender_rate_limit}{54}{1}{0}}

to: (not tested)...

delay     = ${eval: $sender_rate_int - $sender_rate_limit }s


- may need a multiplier of ten in the limit number used or in the equation..

HTH

Bill