[Dovecot] Re: Getting maildir++ quotas working
...snip... So there are two problems that I am trying to resolve, but I'm not sure how to go about fixing it. Any help would be greatly appreciated:
(1) Dovecot isn't announcing QUOTA support in the capability string.
Timo posted the following patch from Joshua Goodal a while ago to get the QUOTA added to the capability string: --- 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"); } I don't know for sure that it still applies, but it looks promising.
(2) Dovecot isn't getting a valid quota limit, which I assume is breaking the GETQUOTAROOT command.
No comment. Regards, Robin
Robin Breathe wrote:
...snip... So there are two problems that I am trying to resolve, but I'm not sure how to go about fixing it. Any help would be greatly appreciated:
(1) Dovecot isn't announcing QUOTA support in the capability string.
Timo posted the following patch from Joshua Goodal a while ago to get the QUOTA added to the capability string:
--- 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"); }
I don't know for sure that it still applies, but it looks promising.
(2) Dovecot isn't getting a valid quota limit, which I assume is breaking the GETQUOTAROOT command.
No comment.
Regards, Robin
Has anyone had any luck getting the maildir++ quotas working yet?
On Mon, March 13, 2006 12:08, Lee Smith said:
Has anyone had any luck getting the maildir++ quotas working yet?
We were finally able to get maildir quotas working, but had to add these patches... --- src/plugins/imap-quota/imap-quota-plugin.c 2006-04-04 17:32:51.173260878 -0400 +++ src/plugins/imap-quota/imap-quota-plugin.c.1 2006-04-04 17:32:42.972572807 -0400 @@ -29,7 +29,7 @@ list = quota_root_get_resources(root); for (i = 0; *list != NULL; list++, i++) { ret = quota_get_resource(root, *list, &value, &limit); - if (ret > 0) { + if (ret >= 0) { if (i > 0) str_append_c(str, ' '); str_printfa(str, "%s %llu %llu", *list, --- configure 2006-04-04 22:21:37.000000000 -0400 +++ configure.1 2006-04-04 22:21:27.000000000 -0400 @@ -31096,7 +31096,7 @@ -capability="IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS" +capability="IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS QUOTA" cat >>confdefs.h <<_ACEOF #define CAPABILITY_STRING "$capability"
On Tue, 2006-04-04 at 22:25 -0400, Bill Boebel wrote:
--- src/plugins/imap-quota/imap-quota-plugin.c 2006-04-04 17:32:51.173260878 -0400 +++ src/plugins/imap-quota/imap-quota-plugin.c.1 2006-04-04 17:32:42.972572807 -0400 @@ -29,7 +29,7 @@ list = quota_root_get_resources(root); for (i = 0; *list != NULL; list++, i++) { ret = quota_get_resource(root, *list, &value, &limit); - if (ret > 0) { + if (ret >= 0) { if (i > 0) str_append_c(str, ' '); str_printfa(str, "%s %llu %llu", *list,
Oh. This is actually the wrong fix though, correct fix is to make maildir_quota_get_resource() return 1 instead of 0.
--- configure 2006-04-04 22:21:37.000000000 -0400 +++ configure.1 2006-04-04 22:21:27.000000000 -0400 @@ -31096,7 +31096,7 @@
-capability="IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS" +capability="IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS QUOTA"
Yea, I guess this should be made runtime configurable. Even better would be some automation by looking at what plugins are used, but I'm not sure how well that would work.
participants (4)
-
Bill Boebel
-
Lee Smith
-
Robin Breathe
-
Timo Sirainen