PDA

View Full Version : Account Quota Script based on Percentage usage



bulldust
09-06-2011, 06:19 AM
Hi All,
Regarding a similar request in a previous thread (http://forum.icewarp.com/forum/showthread.php?388-Script-to-find-full-mailboxes), the script below lists user accounts that are above their quota based on percentage usage.

The main difference between my script and the one currently in the administrator tools section on the forum is that in addition to listing accounts over their quota, it can also list accounts that have gone over a certain percentage of their quota e.g you can set the script variable $limit_quota to 80 and this will list all the user accounts that have used 80% and over of their quota. Comes in handy for auditing, marketing and planning purposes.

The script produces 3 log files:
- 1 html log file showing all accounts above their usage based on the percentage set in the script. Accounts that have used up 100% of their quota are listed in red
- 1 csv file for each domain listing all the accounts that are above the percentage set
- 1 csv file listing all accounts from all domains that above the percentage set. handy if you dont want to open each domain csv file.

Please read the comments section in the script, it will guide you where to change the directory to save the log files, the account quota percentage you want to set and the timezone you are running the script from for log file timestamping.

If you receive timeout errors, it is advisable to run it under fastcgi with a high timeout if you have a large number of accounts on your server. Please see Icewarp help file to set this up.

The script will make it to the administrator tools section soon. Please post any bugs,questions etc

Hope it suits your needs.

132

cheers