Re[2]: [Exim] New exim code having DB writing problems

Top Page
Delete this message
Reply to this message
Author: Peter A. Savitch
Date:  
To: Philip Hazel
CC: Philip Hazel
Subject: Re[2]: [Exim] New exim code having DB writing problems
Hello Philip,

Friday, September 20, 2002, 10:49:20 AM, you wrote:

PH> On Thu, 19 Sep 2002, Kevin P. Fleming wrote:


KPF> I've got callout verification caching code writting and (nearly)
KPF> working. As it turned out, it was quite easy to do, owing to how well
KPF> organized and understandable the Exim sources are. (I'm working with
KPF> Exim 4.10, of course).


[snip]

What do You think about caching mailbox quota information? Is it
possible using the similar technique? I'm interested in this because I
use maildir format, which is quota-expensive. Of course I turn on size
tags, regex'es and all other stuff, but I would like to reject
overquoted recipients during SMTP (in RCPT ACL), and not to queue them
in any way.

Rejecting overquoted recipients looks very common to large mail
systems (I've got one ;-).

My idea is the following:

1. Maintain a cached quota information for each mailbox with a
configurable key used in both appendfile transport and verify
routers.

   Data item should have:
     + numeric quota usage value:
        + updated by appendfile transport
        + used by appendfile transport
     + boolean overquota state:
        + updated by appendfile transport
        + used by verify routers
     + last-modify timestamp
        + updated by appendfile transport
        + used by verify routers


Configurable key is optional. Router/appendfile option example
usage:

quotacheck_key = $local_part@$domain
quotacheck_key = ${md5:$local_part@$domain}


2. Provide per-transport configurable TTL policy.
   quota_ttl = <time>         # minimum time-to-live; do not
                              # recalculate quotas during TTL
                              # default == 0
                              # 0 means zero TTL (always recalculate)


3. Make quota information available to the RCPT ACL. Approach is to
reject long-term overquota, with a configurable term, depending on
other conditions (such as domain). Key absense should not give an
error since not every recipient is a mailbox recipient. Address
verification of redirected recipients is in accordance with normal
Exim pragmatic approach.

This could be done by means of a new address verify option
quotacheck (or just quota).

Semantics: immediately reject recipients that have
overquoted mailbox during last 6 hours:

      verify=recipient/quotacheck=6h
      verify=recipient/quota=6h


Time provided implicitly sets expiry period.

Verify router should be aware of the quota information precense by
means of generic router option `quotacheck', boolean:

quotacheck
no_quotacheck

Could be another one (time specified by router):

ACL: verify = recipient/quotacheck
Router: quota_ttl = 6h

4. DB failure should produce the warning and Exim should fall back to
original `expensive' processing.

5. Feature must be enabled at compile-time (just like SUPPORT_MAILDIR
and others). When enabled, additional options become available.

The problem still is to distinguish between verification failure due
to overquota and give appropriate warnings (message = "...").
Can some verification results be passed back to ACL?

Philip, as usual, I don't expect You to implement this, just give me
Your thoughts on it, if possible. I very appreciate them.

Thanks.
--
Best regards,
 Peter                            mailto:spam4octan@highway.ru