Categories
Plesk

Quick command : Top 25 Mailboxes by Size

Description : This command will email (or display in terminal) the top 25 mailboxes, ordered by size. Strangely – Plesk doesn’t seem to have any kind of Mailbox Size report, and will only show you the domain mailboxes combined.

Simply SSH into your Plesk server and run the following :

cd /var/qmail/mailnames
du -hs --block-size=1024K */* | sort -nr | head -25 | mail -s 'Top 25 Mailboxes by Size' [email protected]

And if you wish to display on screen :

cd /var/qmail/mailnames
du -hs --block-size=1024K */* | sort -nr | head -25

The first script could be set up as a handy Cron job to send you a weekly / monthly report.

By Mik Canavan

I'm a tech obsessed and self-confessed geek. As the Technical Director at Fivenines UK, I'm lucky that I get to faf with gadgets, design websites and fix servers...

2 replies on “Quick command : Top 25 Mailboxes by Size”

You would think after all this time they would of created some sort of reporting tool – then again, this is Parallels we are talking about.

Hey mate just wanted to thank you SO much for taking the time to post this and finally solve such a common problem so easily! You have saved me hours of my life trying to implement much more complicated solutions.

Bloody legend!

Leave a Reply

Your email address will not be published. Required fields are marked *