The cPanel account management system used by Birdhouse Hosting has proved to be very complete (though not without its glitches and surprises), and its tools have saved me a ton of work. It’s been nice to not have to write a script for every new piece of functionality needed. But was shocked recently to discover that cPanel doesn’t send alert messages to POP account holders when mailboxes are nearing quota. Started looking for something to fit the bill, didn’t find anything that did the job neatly, so wrote a shell script for cPanel systems.
checkmailquota loops through the home dirs and, for each home, loops through hosted domains. For each domain, loops through mailboxes, recording byte sizes. Compares these sizes to what’s listed in the quota file for that mailbox. If usage is within xx% of quota, sends a warning message to that mailbox. Also sends a summary of accounts near quota to postmaster.
It seems bizarre to me that a script like this, or equivalent functionality, isn’t built into cPanel (at version 10 no less!)