Re: [exim] Rate Limiting?

Top Page
Delete this message
Reply to this message
Author: Clive Goodhead
Date:  
To: exim-users
Subject: Re: [exim] Rate Limiting?

> Dear all,
>
> is rate limiting a part of Exim in the meanwhile?
>
> If not, did anyone implement such a thing and would be willing to

share
> his / her code?
>


We use a small C program run (by a RCPT ACL) each time an
authenticated user sends a RCPT command to exim. The program,
that we call 'exilimit' queries information stored in a MySQL
database to determine whether or not the user has exceeded
their quota for outgoing emails.

The system uses a decay function which not only allows all
of the relevant information for a user to be stored in a
single row of the database, but also provides a reasonable
rate limit once the absolute limit has been reached. (The
function used means that a user with an absolute limit of
100 emails per day may send an email every 23 minutes (approx)
even after having sent 100 messages (if that makes sense).
We believe that this provides protection against spammers
while being acceptable to normal users.

The downside, of course, is that this system increases system
load. Rewriting the code as a daemon with persistent database
connections would improve matters as would incorporating it
into exim itself. However, we have not yet needed to do the
former and the latter is beyond my coding abilities.

I can post the code if anyone is interested - on the basis
that it works for us, but no warranties.

Clive Goodhead
Cornwall Internet Limited



> I found an old e-mail in the archives (dated 1999) where someone

said he'd
> written some perl script to keep analyzing the Exim mainlog for

that.
>
> Regards,
> Torsten
>