Simple way to get mailbox size by folder.

Aki Tuomi aki.tuomi at dovecot.fi
Sat Dec 3 21:53:42 UTC 2016


> On December 3, 2016 at 11:16 PM Vijay Sarvepalli <vijay at ericavijay.net> wrote:
> 
> 
> Is there a simple way to get each mailbox size using dovecot's IMAP
> interface?  The GETQUOTAROOT and GETQUOTA seems to work with the full
> maildir size and not the individual folders.
> 
> I am finding a simple way for the webmail client to show usage of each
> folder.
> 
> Thanks
> Vijay

$ doveadm mailbox status -u cmouse all INBOX
INBOX messages=9206 recent=0 uidnext=33115 uidvalidity=1451655531 unseen=7 highestmodseq=39954  vsize=538582181 guid=d595a62d65818656f72c000074be03de

$ doveadm -fjson mailbox status -u cmouse at cmouse.fi all INBOX
[{"mailbox":"INBOX","messages":"9206","recent":"0","uidnext":"33115","uidvalidity":"1451655531","unseen":"7","highestmodseq":"39954","vsize":"538582181","guid":"d595a62d65818656f72c000074be03de"}]

JSON support might not be available in your version, if it's old enough.

Aki


More information about the dovecot mailing list