Re: [exim] Configuring mailbox quotas on large servers

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Todd Lyons
Fecha:  
A: exim-users
Asunto: Re: [exim] Configuring mailbox quotas on large servers
On Fri, Nov 27, 2009 at 4:11 PM, Phil Pennock <exim-users@???> wrote:
>> Are there any other ways of doing this?  If there are, nothing has
>> come to mind and I welcome suggestions.
>
> Two Routers which accept the same email.  The first is set
> "verify_only", the second is the maildrop Router, which is set
> "no_verify".


Groovy, I'll look into doing that.

> The first Router is a "redirect" router.  You use "data" to decide where
> to redirect to.  You use string expansion in the "data = ..." line to
> decide if the recipient is within quota.


This is the fuzzy part. To get the current size, either I or exim
have to parse the maildirsize file.

> If within quota, you redirect to a holding file: in practice, because
> this is verify_only, you will never deliver to that file, so could use
> /dev/null; but for safety's sake, redirect to a real file.  Set up your
> monitoring so that if that file ever grows to have length > 0 then you
> alert fast, because something has gone wrong with a config push as
> someone has removed verify_only.


Makes sense.

> If not within quota, you :defer: the expansion.  Perhaps :fail:.  Test.


I'm partial to deferring, but an argument could be made for failing
since the sender gets an immediate notification that it did not get
delivered.

> Now, if Exim has access to the mail storage area directly, you might use
> an "accept" Router for the verify_only step and check quotas that way
> (instead of the redirect's data = ...), but unless you're using mbox (or
> other single-file) format, I think this would turn out to be a bad idea
> in this case.  Because you'd never deliver with Exim, you'd never update
> the quota files used by Exim to cache the usage within the maildrop, so
> every delivery might be an expensive calculation over the existing
> files.
> If you have the source to the maildrop command and can update it to also
> update the quota files used by Exim, you could still do it this way.
> This is what I'd probably do myself.  But I've got strange tastes,
> sometimes.


They do use the same file: $MAILDIR/maildirsize

It looks like Exim can do what I thought had to be provided by an
external LDA. I'll start experimenting now.

Truthfully, I'm a bit stunned. I completely overlooked Exim's
extensive quota facilities because I was scope-locked on my past
positive experiences with maildrop. I did not realize that I could
use exim to enforce quota (in a router, so I think that will allow me
to defer/reject at SMTP time, which is my ultimate goal). I thought I
had to hand it off to something else in order to get quota
enforcement.

Thanks for the redirect Phil!
-- 
Regards...      Todd
The best thing about pair programming is that you have the perfect
audience for your genius.  -- Kent Beck