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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Robert Blayzor
Ημερομηνία:  
Προς: Todd Lyons
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Rejecting over quota at RCPT time - revisited
On Nov 30, 2012, at 4:47 PM, Todd Lyons <tlyons@???> wrote:e:
>>>      It would appear that unless I remove root squash for my mail
>>> servers, my only option is to have a cheap daemon running as that
>>> unprivileged user which will simply listen on a port for a command, do
>>> the calculation, and return the answer.
>> Honestly, the daemon approach is what I'd use, because you can then do

>
> I ended up not doing all the caching, I just did one simple function.




I actually expanded upon what I was working on. Since we have several servers I wanted a way to share information between them all in a distributed/scalable/fast way. I ended up using embedded perl with the memcached pm. Optimized some calls and now I cache quota results for up to 5-10 minutes and it greatly reduces IO load. There is still a chance that new emails get rejected for that time while the cache expires. No big deal. Increasing the quota in the database works fine... The overall goal was to reduce NDR's for over quota and to reduce IO/CPU load to the filesystems to recalc the quota for each RCPT. That goal was achieved.

I also store things like excessive bad authentications, max messages per authenticated user (per day), hosts that send to many viruses in X minutes block for Y, and all works over all servers in the cluster. Works like a charm.

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