I'm using this shellscript to generate a list of inboxes and the sizes of all folders, for each user, as follows:
john.doe@mydomain.com's max mailbox size = 0 MB, current mailbox size = 18,78 GB.
size (MB) msgcount unread folder
--------- --------- ---------- ----------------------------
0 0 0 /Chats
42 0 /Drafts
13118 28014 37 /Inbox
0 6 0 /Junk
0 1 0 /Orders
323 13385 17 /Raster
5772 3760 0 /Sent
1 183 0 /Payments
0 2 0 /Trash
-------------------------------------------------------
I need to mine data from this and throw it into CSV where on each line I'll have the email account and the values for Trash, Sent and Junk folders values. The problem is the "Inbox" because, as you can see, users created folders outside the tree (like "Raster" and "Payments"). So I need to find a way to sum everything that's not "thrash/sent/junk" for each user from this report.