[Dovecot] Quota

Thomas Wouters thomas at xs4all.net
Wed Apr 20 04:52:12 EEST 2005


On Wed, Mar 16, 2005 at 12:15:43AM +0200, Timo Sirainen wrote:

> If anyone's interested about implementing quota code for Dovecot (there
> were a few of you before! :), now it's finally your chance to do it
> quite easily.

Hah, excellent. I suspect my colleague Cor was one of the people interested
in quota support, and I know I am. So I took the example and turned it into
an rquotad (quota-over-nfs) implementation. It's fairly FreeBSD specific at
the moment, as rquotad is an RPC mess and I had to be inspired by the source
of the 'quota' command, but I suspect it's probably possible to port it to
other operating systems. When it's done, that is.

The plugin seems a bit out-of-date, by the way; it passes the wrong number
of arguments to 'mailbox_open', and uses a nonexistant function
'i_stream_get_size'. I had to fudge around that creatively to get the plugin
to compile. The rquotad plugin is done, more or less, except for figuring
out how to properly get at a mailbox's physical location, if it has one. I
really don't want to maintain a static list in an environment variable; we
currently use 10 different filesystems (all NFS) for mail storage, and they
all have different quotas and usage. I don't particularly care about
checking quotas before an attempted write, but I implemented that as best I
could; I still need to figure out how to decode the mail_transaction_context
to see where a mail is moved from/to in order to finish it.

The quota-plugin thing obviously isn't quite done yet (at least, not the
tarball version from the patches/1.0 directory) -- it lacks some error
checking, I think, and a capability hook from what I can tell. (There *is* a
capability for quotas, I hope, in IMAP ?) If you lack time but have an idea
as to what needs to be done, I can work on it and submit patches. Once I get
the rquotad plugin *somewhat* working I'll put it up somewhere, too.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!



More information about the dovecot mailing list