Marc Perkel wrote:
>
> 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.
>
>
>
How about testing to see if it has advanced by duplicating the above clause
immediately following that one, but with a slightly different header name?
And/or a 'warn' verb vs 'accept'
- a couple of logwrite & log_message wouldn't hurt, either....
Bill