After very nearly losing a key customer who lost a lot of important mail when his POP account went over quota, I've been looking for something that would send email alerts to POP account holders when their mailboxes are near quota, and summaries of accounts near quota to the hostmaster. Didn't find anything that seemed to do the job neatly, so wrote a shell script for cPanel systems, available here:
http://hosting.birdhouse.org/scripts/checkmailquota.txt
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. At end of script, sends a summary of accounts near quota to postmaster.
When I switched to cPanel, I did so because I was getting tired of writing stuff like this all the time. cPanel has seemed pretty complete, but it seems bizarre to me that a script like this, or equivalent functionality, isn't built into the system (at version 10 no less!) Weird. Anyway, hope someone finds this useful.
If you make modifications or have suggestions, please send them on.



LinkBack URL
About LinkBacks
Reply With Quote





