[Dovecot] quota reporting and mail.app

Benjamin R. Haskell dovecot at benizi.com
Thu Sep 20 01:54:39 EEST 2007


On Wed, 19 Sep 2007, Mike Horwath wrote:

> On Wed, Sep 19, 2007 at 02:59:18PM -0700, Rich at Whidbey Telecom wrote:
>> If I remember right, this is a known issue, where Mail.app won't
>> report the quota when QUOTAROOT is "".  We've found no fix for it
>> here as it seems to be a Mail.app issue.
>
> That's my guess as well, but after checking another IMAP server
> (Communigate Pro), it returns a filled in string as well (#Account).
>
> I don't have any UW-imap servers to touch, though :(
>
> So, Courier-IMAP and Communigate Pro both return a filled in string
> (though values are different), and Dovecot does not.
>
> <back to RFC hunting>

What's to hunt?

http://tools.ietf.org/html/rfc2087#section-4.3

RFC 2087 is the IMAP4 QUOTA extension. Section 4.3 has a pretty clear 
example of a GETQUOTAROOT command and its response. Dovecot's response is 
nearly verbatim.

As Rich mentioned, it appears to be a Mail.app issue with the empty-string 
QUOTAROOT name.

There's a FIXME in the dovecot source regarding this:

root = quota_root_init(setups[0], ""); /* FIXME: name? */

See attached patch (against 1.0.3, but from hg.dovecot.org, seems to still 
be valid) for a workaround. It causes dovecot to use a default QUOTAROOT 
name of "DEFAULT". [ I left the /*FIXME*/, since I'm not Timo. :-) ]

Best,
Ben
-------------- next part --------------
diff -ur dovecot-1.0.3-orig/src/plugins/quota/quota.c dovecot-1.0.3-patched/src/plugins/quota/quota.c
--- dovecot-1.0.3-orig/src/plugins/quota/quota.c	2007-07-30 02:14:41.000000000 -0400
+++ dovecot-1.0.3-patched/src/plugins/quota/quota.c	2007-09-19 18:42:38.000000000 -0400
@@ -180,7 +180,7 @@
 		/* create a new quota root for the storage */
 		struct quota_root *root;
 
-		root = quota_root_init(setups[0], ""); /* FIXME: name? */
+		root = quota_root_init(setups[0], "DEFAULT"); /* FIXME: name? */
 		found = quota_mail_storage_add_root(storage, root);
 		i_assert(found);
 	}


More information about the dovecot mailing list