[Dovecot] beta1: how to use quota plugin???
Hi, After searching gmane.mail.imap.dovecot on the topic, and wiki.dovecot.org, I'm still clueless on how to use RFC 2087 quotas in dovecot with the quota plugin. How come no wiki doc?
My setup: Solaris 9, mbox format. Both the filesystem for INBOXes (/var/mail) and the user's home directories have filesystem-based quotas imposed. For example:
% quota -v joeblow Disk quotas for joeblow (uid 20737): Filesystem usage quota limit /export/home 955 298000 302400 (where indices and mail folders go) /var/mail 530 151200 204800 (where joeblow's INBOX lives)
If joeblow connects via dovecot IMAP, I want our webmail code (horde/imp) to tell him his disk quotas to keep him out of trouble. Horde/Imp (2.2.5) has quota code that says it works with Courier imap. Dovecot is supposed to be Courier compatible. How do I get the quota info out of Dovecot and down to Horde/IMP?
Jeff Earickson Colby College
On 19.1.2006 22:47, "Jeff A. Earickson" <jaearick@colby.edu> wrote:
Hi, After searching gmane.mail.imap.dovecot on the topic, and wiki.dovecot.org, I'm still clueless on how to use RFC 2087 quotas in dovecot with the quota plugin. How come no wiki doc?
I haven't yet managed to make it work myself either. Although I got as far as my system telling me that it doesn't support quotactl() syscall.
The point is anyway that userdb should be providing a "quota" named variable to Dovecot. So it doesn't even work with all userdbs yet. I'll probably have to add some other place to set it up also (similar to default_mail_env). Anyway, its format should be:
quota=fs:/home/user/mail
Or if all of the users are in same quota root, I suppose fs:/home works just as well.
If joeblow connects via dovecot IMAP, I want our webmail code (horde/imp) to tell him his disk quotas to keep him out of trouble. Horde/Imp (2.2.5) has quota code that says it works with Courier imap. Dovecot is supposed to be Courier compatible.
Well, Dovecot is mostly Courier compatible in its Maildir handling. I'd think the quota plugin is RFC2087 compatible and having nothing Courier-specific.
tor, 19,.01.2006 kl. 23.01 +0200, skrev Timo Sirainen:
I haven't yet managed to make it work myself either. Although I got as far as my system telling me that it doesn't support quotactl() syscall.
You should have answered my two-three earlier mail on the subject, saying it didn't work for you neither, and I had saved litterally ten's of hours trying to understand the code :P
The point is anyway that userdb should be providing a "quota" named variable to Dovecot. So it doesn't even work with all userdbs yet. I'll probably have to add some other place to set it up also (similar to default_mail_env). Anyway, its format should be:
quota=fs:/home/user/mail
Or if all of the users are in same quota root, I suppose fs:/home works just as well.
If joeblow connects via dovecot IMAP, I want our webmail code (horde/imp) to tell him his disk quotas to keep him out of trouble. Horde/Imp (2.2.5) has quota code that says it works with Courier imap. Dovecot is supposed to be Courier compatible.
Using maildir quota (dirsize:/home/blabla:storage=10000), this works if you use this patch (from Joshua Goodal) --- imap-quota/imap-quota-plugin.c 14 Dec 2005 21:28:44 -0000 1.2 +++ imap-quota/imap-quota-plugin.c 6 Jan 2006 00:43:14 -0000 @@ -189,4 +189,5 @@ void imap_quota_plugin_init(void) command_register("GETQUOTA", cmd_getquota); command_register("SETQUOTA", cmd_setquota); + str_append(capability_string, " QUOTA"); } So the plugin works with horde/imp. But I would also like it to support filesystem quota's. Timo; how much would I need to donate to make you take a look at the code again? :) Best regards, Stian
On Thu, 19 Jan 2006, Timo Sirainen wrote:
Date: Thu, 19 Jan 2006 23:01:40 +0200 From: Timo Sirainen <tss@iki.fi> To: Jeff A. Earickson <jaearick@colby.edu>, dovecot@dovecot.org Subject: Re: [Dovecot] beta1: how to use quota plugin???
On 19.1.2006 22:47, "Jeff A. Earickson" <jaearick@colby.edu> wrote:
Hi, After searching gmane.mail.imap.dovecot on the topic, and wiki.dovecot.org, I'm still clueless on how to use RFC 2087 quotas in dovecot with the quota plugin. How come no wiki doc?
I haven't yet managed to make it work myself either. Although I got as far as my system telling me that it doesn't support quotactl() syscall.
The point is anyway that userdb should be providing a "quota" named variable to Dovecot. So it doesn't even work with all userdbs yet. I'll probably have to add some other place to set it up also (similar to default_mail_env). Anyway, its format should be:
quota=fs:/home/user/mail
Or if all of the users are in same quota root, I suppose fs:/home works just as well.
Timo, I feel much better about this if you don't understand it either. :) Assuming for the moment that quotactl() works, is the syntax above what one puts in the dovecot.conf to invoke the quota-fs library? Just out of curiosity, does your fs_quota_get_resource() routine do what you expect it to on Solaris?
I notice that doing a "man quotactl" on both S9 and S10 shows that the relevant call is ioctl(), not quotactl(). That may be the problem on Solaris. For HP-UX, there really is a quotactl(2) system call. Tomorrow, I'm going to write a little standalone program to try and mimic quota(1) output via ioctl() or quotactl() and figure out how it works in C.
Jeff Earickson Colby College
participants (3)
-
Jeff A. Earickson
-
Stian Jordet
-
Timo Sirainen