From bec72f05b1cf3a6461eb564f9eb3e933b7d8608c Mon Sep 17 00:00:00 2001 From: Sebastien Date: Wed, 20 Oct 2021 17:14:25 +0200 Subject: [PATCH] ver 1.0 --- zimbra/divers/export_accounts_quota.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 zimbra/divers/export_accounts_quota.sh diff --git a/zimbra/divers/export_accounts_quota.sh b/zimbra/divers/export_accounts_quota.sh new file mode 100644 index 0000000..046e5e0 --- /dev/null +++ b/zimbra/divers/export_accounts_quota.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "Process Export Quota" +zmprov -l gaa | while read ACCOUNT +do + +QUOTA=`zmprov ga ${ACCOUNT} | grep "zimbraMailQuota" | awk -F: '{ print $2 }'` +USAGE=`zmmailbox -z -m ${ACCOUNT} gms` + +QUOTA=`expr ${QUOTA} / 1024000000` +QUOTA="${QUOTA} GB" + +echo "ma ${ACCOUNT} zimbraMailUsage : ${USAGE} / ${QUOTA} " +done > /tmp/accounts.csv