On Fri, 2009-01-23 at 10:42 -0200, Allison Vollmann wrote:
> Hello,
> 
> i want to get the maildir current quota usage of an user, but i'd know 
> what is the better way to do.
> 
> in imap clients my quota usage, in example, show: 505KB, but if i sum 
> only the size of each message from Maildir, i get total: 440KB, trying 
> to use real and apparent block size but the sum differs from value 
> showed in imap client.
> 
> is quota usage based on why, have another way to do this?

Dovecot counts quota using messages' real sizes in bytes. You could
detect if Dovecot has done a miscalculation somewhere by deleting
maildirsize file and seeing if it's still the same after recalculation.

Anyway one possibility of getting the quota is just to log in and get
the quota. For example you could set up a master user (see wiki) and
allow it to log in only from localhost. Or maybe you could run imap
directly, something like:

USER=wanted_user dovecot --exec-mail imap
1 GETQUOTAROOT INBOX

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to