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

Top Page
Delete this message
Reply to this message
Author: bug428
Date:  
To: exim-dev
Old-Topics: [exim-dev] [Bug 428] New: Greatly expand ratelimit features
Subject: [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


graeme@??? changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.63                        |4.67





------- Comment #3 from graeme@??? 2007-06-19 10:54 -------
Usage for ratelimit "/ noupdate" option:

In relevant ACLs, it's possible to lookup the existence of a specified (or
auto-generated) ratelimit key without incrementing the ratelimit counter for
that key.

Syntax:

warn ratelimit = rate / period / strict|leaky [/ noupdate] [/ options] [/ key]

In order to make use of it, another ACL entry *must* set the rate somewhere (or
the noupdate option is useless). In this case, the "/ per_cmd", "/ per_mail" or
"/ per_rcpt" options must be used or the previously precomputed rate from the
"/ noupdate" line will be used and no update will be done.

Example:

acl_check_connect:

  # Read the rate; if it doesn't exist or is below the maximum
  # we update it below
  deny ratelimit = 100 / 5m / strict / noupdate
       log_message = RATE: $sender_rate / $sender_rate_period (max
$sender_rate_limit)


[... some other logic and tests...]

  warn ratelimit = 100 / 5m / strict / per_cmd
       log_message = RATE UPDATE: $sender_rate / $sender_rate_period (max
$sender_rate_limit)
       condition = ${if le{$sender_rate}{$sender_rate_limit}}


accept


In order to make proper use of this, it is important to set an appropriate key
as the last part of the ratelimit function. The precomputed key is of the form:

$ratelimit_period / strict|leaky / $sender_host_address

This is useful for the SMTP "connect" ACL, and perhaps others; to make use of
(for example) per-recipient ratelimits then it will be worth creating a
specific key which includes the relevant detail:

deny ratelimit = 100 / 5m / strict / per_rcpt / $local_part@$domain
     message = This recipient is receiving messages too quickly.\
               Please try again later.


===============================================================================

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