Re: [exim] Rejecting over quota at RCPT time - revisited

Top Pagina
Delete this message
Reply to this message
Auteur: Robert Blayzor
Datum:  
Aan: Todd Lyons
CC: exim-users@exim.org
Onderwerp: Re: [exim] Rejecting over quota at RCPT time - revisited
On Nov 28, 2012, at 10:47 PM, Todd Lyons <tlyons@???> wrote:
> Tomorrow, I will be experimenting with jamming the following into a
> perl function (I use the embedded perl a lot) and call it as a
> condition for a verify_only router, and then defer with an appropriate
> quota related message is customer is already over quota to stop
> further incoming emails from clogging the queue.



While a perl monger myself, I've been hoping to avoid embedding perl into Exim just for this one purpose.

Seems feasible and not that expensive, but possibly doing that check for each and every RCPT could be costly overall depending on mail volume and number of accounts you have. Perhaps adding something in to either touch a file in the maildir or use something else (database or memcached) to say signal the box is over quota if that condition happens. You could then check a timestamp and determine if you want to run the more expensive operation or computing the quota again. If the file time expires, recompute; if they're still over quota, refresh the timestamp, if they're not, remove the entry and return an under quota condition.

In our environment since this would be done as a router condition we already know the homedir/maildir so we could just pass that into the Perl function (one would hope). So that part of the code isn't really needed if you grab that info early enough to pass it in.

--
Robert Blayzor
INOC, LLC
rblayzor@???
http://www.inoc.net/~rblayzor/