Re: [Exim] list for determining quotas

Top Page
Delete this message
Reply to this message
Author: Kirill Miazine
Date:  
To: Derrick MacPherson
CC: exim-users
Subject: Re: [Exim] list for determining quotas
Derrick MacPherson wrote:
> Exim 4.14 with courier-imap 1.7.1 from the FreeBSD 4.7 ports.
>
> I need to make a list of users that will have quotas imposed, the rest
> will not. What are some ways to do this?
> I can use either file system, exim imposed, or deliverquota - so any and
> all suggestions would be appreciated.


File system quotas are best. That's for sure. Whether you should be
using Exim's quota enforcement facility og deliverquota (have never
actually used the latter) depends on your setup, what you try to achieve
etc. I'll give some tips regarding the Exim quotas.

Examples are the best way to explain things. My setup matches yours very
much - Exim (surprise!) and Courier IMAP (I do use another BSD however).

User info is stored in PostgreSQL, but this info is dumped to a DB file
which both Courier and Exim use. The DB file is Courier userdb format.

I have three different routers - one to allow custom filters for some
users (Nico's excellent router_home_directory made this possible), one
to do suffix-to-folder-if-exists delivery and one normal delivery to
user's Maildir.

I only post the last router:

courier_maildir:
    driver = redirect
    domains = +courier_domains
    local_part_suffix = -*
    local_part_suffix_optional
    address_data = ${tr{${lookup{$domain-$local_part}dbmnz{USERDB}{$value}fail}}{|}{ }}
    router_home_directory = ${extract{home}{\
        ${tr{${lookup{$domain-$local_part}dbmnz{USERDB}{$value}fail}}{|}{}}\
    }{$value}}
    data = ${extract{home}{$address_data}{$value/Maildir/}}
    directory_transport = courier_dir


USERDB is a macro that defines where userdb.dat is located.

Now the relevant transport:

courier_dir:
    driver = appendfile
    maildir_format
    maildir_tag = ,S=$message_size
    create_file = belowhome
    create_directory
    quota = ${extract{quota}{$address_data}}
    quota_directory = ${extract{home}{$address_data}}
    quota_size_regex = ,S=(\d+)
    return_path_add
    envelope_to_add
    message_prefix =
    message_suffix =
    user = mail
    group = mail


As you see, there are three quota-related options. Read the docs for
whay they do.

> Whatever I end up using will be posted back to the list if people so
> desire.


--
Kirill Miazine
mailto:km@krot.org
http://km.krot.org/