Re: [exim] Ratelimit Messages

Top Page
Delete this message
Reply to this message
Author: Exim Mailing List
Date:  
To: exim-users
Subject: Re: [exim] Ratelimit Messages
On Wed, Feb 27, 2008 at 10:35:39AM -0600, Matt wrote:
> I have this to rate limit messages:
>
> warn ratelimit = 100 / 1h / per_rcpt / strict
>         delay = 10s
>         log_message = Sender $sender_address rate $sender_rate /
> $sender_rate_period excedes limit delayed 10 seconds

>
> Problem is when a user is using Squirrelmail there IP is always listed
> as 127.0.0.1. I do not think there is any good solution to that
> really though. Is there a way to have one rule thats for users that
> are NOT 127.0.0.1 and another for users that are 127.0.0.1? If so how
> do you do that?


We solved a similar problem by having our webmail client use SMTP
authentication, and then using a key in our ratelimit of something
like this:

  warn ratelimit = 100 / 1h / per_rcpt / strict / \
       ${if !eq{$authenticated_id}{} {$authenticated_id}{$sender_host_address}}
       delay = 10s
       log_message = Sender $sender_address rate $sender_rate /
                     $sender_rate_period excedes limit delayed 10 seconds


This of course assumes you already have SMTP auth support configured
into Exim. If you do, just enable smtp auth in your webmail client when
it connects via SMTP to submit the message and use the above ACL.

--
Dean Brooks
dean@???