RE: [Exim] Exim quotas with maildir_use_size_file

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Eli
Date:  
À: exim-users
Sujet: RE: [Exim] Exim quotas with maildir_use_size_file
>I did not implement this feature; I just installed the patch after some
>minimal testing. What does the specification of maildir_size_file say? I
>assumed that there was a specification for this.


http://www.inter7.com/courierimap/README.maildirquota.html

Reading over that somewhat quickly, they state that the rules are somewhat
flexible regarding maildirsize files. They also mention a program called
deliverquota which is used to deliver messages (blah blah) - the catchy
thing is that they say to specify the quota to be enforced on the command
line, although I don't know if that value is only used for when the
maildirsize file is created.

Anyways, further down it mentions the format of the maildirsize file, and it
states that the whole reason to storing the quota value in the file is
because not every application may know of the quota setting, so to make it
easy, just save the value in the file (makes sense). However, I'd tend to
say that if a program DOES know what the quota should be via other means,
that value should override what value is saved in the maildirsize file,
considering they even mention that the maildirsize file could be horribly
out of date if not ever application supports it (and maybe during that out
of date time, something changed the proper quota value, but since it didn't
support maildirsize files, didn't update the file).

>I also assume that having the quota in the file is a "feature" that
>allows for different quotas for different users - the value in the
>transport is just the default. So the behaviour doesn't seem unreasonable
> - but then I don't use any of this stuff. Anybody have views on this?


Well it's not that I oppose the feature of storing the quota size in the
file - makes sense since Courier-IMAP will be using it (although I'm not
sure if in the end I'll use Courier-IMAP or Cyrus!). My only issue was that
once that file is set, Exim never changes its quota value - thus Exim
ignores any quota setting it's given in its config file for the value in the
maildirsize file. This becomes a problem when the quota value is stored in
a db or any other method which may try to change the value at any given
time.

For example, I set Exim up to use this maildirsize file, and I have quotas
in MySQL. The quota for a particular user at the time is set to 1mb. They
get their first email ever, the maildirsize file is created, and the quota
in there is set to 1mb. Then since I'm mean I change their quota (in MySQL)
to be just 100k - they receive another message, Exim sees the quota as 100k,
then notices the maildirsize file and overrides that with 1mb from the file.
My quota change in Exim has now been useless and the user gets away with
900k free until I delete the maildirsize file :(

The only reason I wanted to use the maildirsize option in the first place
was because of the mentioned performance gain of cached message info in the
file so that the entire directory size doesn't need to be recalculated every
time (which I actually had almost kill a server once running another mail
program - we had to disable quotas because of it).

Now, if there was another way to cache this data (I'm thinking of using
MySQL entirely for quota support - just might work, but I need to do more
config editing before I can be sure) I'd use that instead. The other viable
solution is maybe a boolean setting in addition to the maildir_size_file
setting so that we can either have Exim use the quota value from the
maildirsize file, or from Exim's config file (which would then be saved
overtop of the value in the maildirsize file). I'd be OK with that as well.

BTW, in my search for more info, I searched google and came up with this
(excerpt) from an email originally dating to the patch donated :)

> and create the file if not present? What if the quota is
> changed in the database, will the change be reflected in
> the maildirsize file?


So it seems this question was raised quite a while back!

Eli.

-----Original Message-----
From: Philip Hazel [mailto:ph10@cus.cam.ac.uk]
Sent: Tuesday, January 13, 2004 8:15 PM
To: Eli
Cc: exim-users@???
Subject: Re: [Exim] Exim quotas with maildir_use_size_file

On Mon, 5 Jan 2004, Eli wrote:

> I am fiddling with quota stuff and I figured I'd use maildir_use_size_file
> to speed up file size calculation (since I've seen other mail software
> almost die just from having to calculate disk space for quotas).
>
> I noticed that with this special file, it also stores the quota size in

it.
> I had initially set the quota to be 10M, and I sent an email to a user,

and
> it created the file and all that good stuff. I then wanted to test the
> quota message, so in exim.conf I changed the quota size to be just 100K,

but
> it seems Exim is using the setting in the file over what is in the

exim.conf
> file:


I did not implement this feature; I just installed the patch after some
minimal testing. What does the specification of maildir_size_file say? I
assumed that there was a specification for this. I also assume that
having the quota in the file is a "feature" that allows for different
quotas for different users - the value in the transport is just the
default. So the behaviour doesn't seem unreasonable - but then I don't
use any of this stuff. Anybody have views on this?

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book
---
[This E-mail scanned for viruses]




---
[This E-mail scanned for viruses]