ghazlewood
Basic Pleskian
Recently I've needed to know the size of the largest mailboxes on a Plesk 8 box. After some quick Googling and testing I've worked out the following to email me the top 25 (or however many) mailboxes by size.
I'm running this weekly by cron so I have a record. Next step is to make it check the psa database for each domain and only show mailboxes near or over quota. But for now it'll do.
Hope someone else finds this useful.
Cheers
George
Code:
#!/bin/sh
cd /var/qmail/mailnames;
du -hs --block-size=1024K */* | sort -nr | head -25 | mail -s 'Top 25 Mailboxes by Size' [email]postmaster@yourdomain.com[/email]
I'm running this weekly by cron so I have a record. Next step is to make it check the psa database for each domain and only show mailboxes near or over quota. But for now it'll do.
Hope someone else finds this useful.
Cheers
George