Get cyrus-imap folder size without "du" tool

Bron Gondwana brong at fastmail.fm
Fri Apr 2 18:40:59 EDT 2010


On Fri, Apr 02, 2010 at 01:40:38PM -0400, Wesley Craig wrote:
> On 02 Apr 2010, at 08:59, Bron Gondwana wrote:
> >Anyway, the quota system works fine.  Just give each user a quota
> >bigger
> >than your disk and use it for the used value!
> 
> It's a shame that the usage isn't calculated whether a limit is
> implemented or not.

Hmm... the issue is that quota roots are somewhat fungible.  Most people
just set them on the user's INBOX and sub-folders inherit them by default,
but that's just one option - you can set quotas on subtrees, or even take
them up to an entire domain.

Making the annotation use quota_mailbox_used and making sure that gets
calculated regardless (it does) would be a good help though - then you
only have to read the index headers at least.

imap/append.c
308:    as->m.quota_mailbox_used += as->quota_used;

I guess allowing "-1" to be set as a limit might make sense... but I'd
want to check the RFC about the QUOTA command to make sure that clients
can accept seeing the information...

Bron.


More information about the Info-cyrus mailing list