[exim-dev] [Bug 428] Greatly expand ratelimit features

Página Inicial
Delete this message
Reply to this message
Autor: bug428
Data:  
Para: exim-dev
Tópicos Antigos: [exim-dev] [Bug 428] New: Greatly expand ratelimit features
Assunto: [exim-dev] [Bug 428] Greatly expand ratelimit features
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=428





------- Comment #1 from graeme@??? 2007-06-19 00:39 -------
Created an attachment (id=198)
--> (http://www.exim.org/bugzilla/attachment.cgi?id=198&action=view)
Attempt #1 to implement "/ noupdate" for ratelimit ACL tests

Attempt #1 to implement "/ noupdate" for ratelimit ACL tests.

Marc's rabid insistence over all things "great" made me go and read the code,
and it doesn't appear so difficult to modify I thought I'd have a crack at it.

This patch *almost* works (against 4.67).

Usage:

warn ratelimit = 10 / 1d / leaky|strict [/ noupdate] [/ key]

The key, if defined, must still be the last item on the line. Note that if the
lookup key (by default "$sender_rate_period / strict|leaky [/
sender_host_address]" *does not exist* in the ratelimit DB then the test will
return false. Something *must* set it for "/ noupdate" to look it up.

Sadly, if a "noupdate" ratelimit lookup/test is the first one in the config
file for a given key, it seems to hold true for all subsequent ones. If it's
the second one, then the first does an update (as expected) and the second
simply looks up the result, as per desired requirement.

I'm buggered if I can get the thing to work both ways. I appear to be in a
logic hole, and my code is probably so poor that Tom and Phil will chuckle at
it and throw it away :)

Anyway, it's a start. Maybe someone else (Marc?) can pick it up and run with
it.

Graeme

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email