Script to List Mailbox Disk Usage in Plesk

Mailbox disk usage
This article will help you to list Mailbox disk usage in Plesk using script.

One of my customers recently approached me and told me to give a detailed list of his mail accounts and mail usage. The script I used for this purpose is given below.

 

Script to list Mailbox disk usage in Plesk

if [ -d /var/qmail/mailnames ]; then echo -ne "nn=== MAILBOXES ===n"; cd /var/qmail/mailnames && TMB=$(du -ks */* 2>/dev/null | sort -nr | cut -f2); if [ -n "$TMB" ]; then echo "$TMB" | xargs du -sh; fi; echo "[`find . -mindepth 2 -maxdepth 2 -type d | wc -l` Mailboxes - Total `du -hs | cut -f1`]"; fi; 

=== MAILBOXES === 
140K example.com/mhtest 
116K  example.com/test 
112K example212.com/gary 
112K 123example.com/drotis 
76K example456.com/jim 
76K example546.com/admin 
[6 Mailboxes - Total 676K]

 

Feel free to modify

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Plesk Management Services

Focus on your business, and let us take care of your Plesk Servers!
From what you are reading, it seems you are interested in Plesk and related technologies. If you have a moment to spare, please take a look at our Plesk Server Management Services plan, and which might interest you even more!
Plesk Server Management Plan

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

ServerHealers uses cookies.