Re: [exim] Ratelimit Tricks

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marc Perkel
Dátum:  
Címzett: Eli
CC: exim-users, Clive Goodhead
Tárgy: Re: [exim] Ratelimit Tricks


Eli wrote:
> Marc wrote:
>> I was just using it to test to see if I could read the $sender_rate
>> variable and it didn't work.
>
> Because the value isn't known until you test the ratelimit first -
> since you can have any lookup key specifed that you'd like, there's no
> way to know what the sender rate is until you've told ratelimit what
> to look up.
>
> Eli.
>


I'm having a little success with this:

accept    !ratelimit = 20 / 10m / test-$sender_host_address
    add_header = X-Ratelimit: $sender_rate - $sender_host_name
    condition = false



At least it's showing the rate lomit. But I'm not sure if the condition
will keep the rate from advancing. If this works then I can then read
the header - or an acl variable in another ACL to actually do the defer.