Get cyrus-imap folder size without "du" tool

Dan White dwhite at olp.net
Thu Apr 1 22:54:12 EDT 2010


On 01/04/10 22:34 -0400, Adam Tauno Williams wrote:
>On Thu, 2010-04-01 at 13:54 -0700, Andrew Morgan wrote:
>> Those values are all annotations.  The annotation you want is:
>> 
>>    /vendor/cmu/cyrus-imapd/size
>
>I suspected as much but haven't had much luck getting a value.
>
>import imaplib
>m = imaplib.IMAP4('imap.mormail.com')
>m.login(***********************)
>m.getannotation('user.adam', '"/vendor/cmu/cyrus-imapd/size"', '"*"')
>---- ('OK', [None])
>m.getannotation('user.adam', '"/vendor/cmu/cyrus-imapd/size"',
>'"value.shared"')
>----('OK', [None])
>m.getannotation('user.adam', '/vendor/cmu/cyrus-imapd/size',
>'"value.shared"')
>-----('OK', [None])
>m.getannotation('user.adam', '/vendor/cmu/cyrus-imapd/size',
>'("value.shared")')
>----('OK', [None])
>m.getannotation('user.adam', '/vendor/cmu/cyrus-imapd/size', '("
>value.shared")')
>----('OK', [None])
>
>Nothing produces a value.  Any pointers?  There seems to be basically
>zero documentation about IMAP annotations.

as an admin:

c getannotation "user/dwhite at olp.net" "/vendor/cmu/cyrus-imapd/size"
"value"
* ANNOTATION "user/dwhite at olp.net" "/vendor/cmu/cyrus-imapd/size" ("value.shared" "35905")

So it seems to care about your unixhierarchysep if you have it set.

Cyrus's implementation appears to be based on a draft version of RFC 5464,
namely:

http://tools.ietf.org/html/draft-daboo-imap-annotatemore-08

-- 
Dan White


More information about the Info-cyrus mailing list