Re: [Exim] Maildirsize files: opinions sought

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Anand Buddhdev
Data:  
Para: exim-users
Asunto: Re: [Exim] Maildirsize files: opinions sought
On Thu, Feb 12, 2004 at 04:38:08PM +0000, Philip Hazel wrote:

> Exim 4.30 was released with support for maildirsize files using some
> contributed code, which I didn't look at very closely, other than check
> that it seemed to work. There were a number of postings on the list
> about problems with maildirsize files.
>
> I have now got round to reading up about these beasts[*], and have
> decided to re-implement the code in my own inimitable style (the
> contributed code, mostly torn from somewhere else, has a lot of baggage
> not needed in Exim). Reading the description in
>
> http://www.inter7.com/courierimap/README.maildirquota.html
>
> raises some questions that I'd like people's opinions on.
>
> 1. It specifies that, when adding up the sizes of files to compute the
> size of a mailbox, only the contents of the "new" and "cur" directories
> should be counted, and *not* the "tmp" directory.


This is fine. Files in the tmp directory may be deliveries in progress,
or stale files left over by a crashed delivery process. It would be
wrong to penalise a user for files in the tmp directory.

> 2. It also specifies that the contents of a maildirfolder called "Trash"
> should not be counted.


This was the original opinion of the Mialdir++ author. However, a lot
of users of the courier-imap and courier-mta packages complained that
users were able to by-pass the quota controls by placing messages in
the Trash folder. He didn't agree that files in Trash should count
towards the quota, but subsequently added an option to the configure
scripts for the courier suite of packages, called --with-trashquota,
which makes the quota calculation code include the Trash folder. I
personally use this option, and agree that files in the Trash folder
should count towards quota. I don't know what your opinion is, but
maybe you can also provide a similar option, to include or exclude
Trash for the calculations. At the moment, I use exim, but do local
deliveries with maildrop. If you modify the maildir++ code in exim,
and support it with this feature, I'd quite happily use exim's native
delivery.

> Neither of these seem right to me. Surely you want to know how much disk
> is being used in the maildir, whatever the files are currently named?


Maildir++ is typically used with courier-imap and sqwebmail, both of
which write additional files inside the Maildir, to store
configuration, and metadata about the messages. These files should not
count towards the quota. The metadata files are typically small, so
they can be ignored as overhead. It would be quite silly if a user
logged in, and had no messages in his Maildir, but still saw a message
saying "you are using 2% of your quota".

> The existing code in Exim (when maildir_use_size_file is not set) just
> adds up the sizes of all the files. It seems to me that the same thing
> should happen when maildir_use_size_file *is* set.
>
> But maybe some of you disagree? As we don't use maildir round here, I
> don't have any actual experience to go on.


--
Anand Buddhdev