how to check zimbra account status and quota size
Below scripts you can run using zimbra user, this scripts using zimbra native tool zmprov to fetch data from ldap and hold in different Variables after completing process scripts send status mails to configured mail idÂ
#!/bin/bash output="/tmp/account_usage" domain="knowledgelinux.com" SendTo="admin@$domain" rm -f $output;touch $output server=`zmhostname` /opt/zimbra/bin/zmprov gqu $server|grep $domain|awk {'print $1" "$3" "$2'}|sort|while read line do usage=`echo $line|cut -f2 -d " "` quota=`echo $line|cut -f3 -d " "` user=`echo $line|cut -f1 -d " "` status=`/opt/zimbra/bin/zmprov ga $user | grep ^zimbraAccountStatus | cut -f2 -d " "` echo "$user `expr $usage / 1024 / 1024`Mb `expr $quota / 1024 / 1024`Mb ($status account)" >> $output done cat $output | mail @SendTo -s"Mailbox Usages for $domain"
you can get such as below results. account current mailbox usage, assigned Mailbox size and accounts status
user1@knowledgelinux.com 51Mb 100Mb (active account) user2@knowledgelinux.com 70Mb 100Mb (active account) user3@knowledgelinux.com 91Mb 100Mb (closed account) user4@knowledgelinux.com 24Mb 100Mb (active account)
For more information fellow below url.
https://wiki.zimbra.com/wiki/Mailbox_usage_report