This script originating from Zimbra Wiki: Getting_All_Users_Quota_Data. I just create a little modification to the script to suit my environment.
This script has features
- It works for Zimbra single server or multi servers
- The script will collect all user quota and save as CSV
- Script use semicolon as separator
- The CSV file will be sent to email. So, you can open using LibreOffice calc for easy reading
Please run this script on the mailbox server. If you have multiple mailboxes, just put this script to one of your mailbox servers.
curl -k https://raw.githubusercontent.com/imanudin11/script/master/checkquota.pl > /opt/zimbra/libexec/checkquota.pl curl -k https://raw.githubusercontent.com/imanudin11/script/master/checkquota.sh > /srv/checkquota.sh chmod +x /opt/zimbra/libexec/checkquota.pl chmod +x /srv/checkquota.sh
Open checkquota.sh and adjust the following lines with your environment
emailSender="email@example.com"; emailRecipient="firstname.lastname@example.org"; mtaServer="localhost";
If you have Zimbra multi server installation, change mtaServer with your MTA server. Install swaks application for sending email
yum install swaks or apt install swaks
Run the script
Please check the email that has been setup in the script. You can find an email like the one below
You can open attachment (CSV file) using LibreOffice calc for easy reading
Good luck 🙂