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?


> Hi Clive,
>
> Do you mind send me a copy of this code as I would like to have a

look
> at this.
>


Posted at http://www.cornwallinternet.com/software/exilimit.c

Hope you find it useful. If you improve it please let me know so that
I can incorporate the changes into the original.

Clive Goodhead
Cornwall Internet Limited


>
> <snip>
> > 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.
> <snip>
>
>