Re: [Exim] Limit outbound emails per hour on user basis

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Avleen Vig
Data:  
Para: Christian Vogel
CC: Yogesh Sharma, exim-users
Assunto: Re: [Exim] Limit outbound emails per hour on user basis
On Sat, Dec 13, 2003 at 10:25:54AM +0100, Christian Vogel wrote:
> You could have an ACL with an condition that contains two SQL
> statements. The first one (which does not return any value) updates
> a database (I think it's at least possible with MYSQL!)
>
>         INSERT INTO mails (user,when) VALUES ('${X}',now())
> the other one returns the number of entries in the database in a specific timeframe.
>         SELECT COUNT(user) FROM mails WHERE user='${X}' AND when > (now()-3600)


You'll also need a either somethign in exim, or something outside exim,
to delete entires > 3600 old, or you'll have one huge db.