Re: [Exim] quota question

Pàgina inicial
Delete this message
Reply to this message
Autor: Sheldon Hearn
Data:  
A: tlabs
CC: exim-users
Assumpte: Re: [Exim] quota question
On (2003/11/20 16:41), tlabs wrote:

> I have this in a transport:
>
> quota = ${lookup mysql{SELECT quota FROM mailusers WHERE user='$local_part' \
>          AND domain='$domain'}{$value}{20M}

>
> and a field called quota in a database.
>
> I have set the quota field to 20M.
>
> Is this quota field updated by exim?
> Or does exim just check that this field iand match it against the value in
> the statement above (20M).


Exim doesn't "update the quota field". You've told Exim to ask your
database what the quota on the mailbox should be.

I think you're really asking "How does Exim know how big the mailbox is,
if it's a maildir?"

If that's your question, here's an example:

local_delivery:
[...maildir-based appendfile options...]
quota = [...your mysql lookup...]
maildir_tag = ,S=$message_size
quota_size_regex = \N,S=(\d+)\b\N

This causes Exim to

1) Append ,S=nnnnn to the filename of every message, where nnnn is the
file size in bytes.
2) Check these appended "tags" to calculate the size of each message
file, instead of using the more expensive stat() call.

See "Operational details for delivery to a new file" in the
documentation.

Ciao,
Sheldon.