How to check accounts that are not active in zimbra
In this tutorial, How to check accounts that are not active in zimbra. You can check the vaule zimbraLastLogonTimestamp by account in Zimbra. Zimbra latest version here
Script from Zimbra blog
Or check the command below
You can check other methods? The comment below. Thank you!
Script from Zimbra blog
#!/bin/bash
echo "Username Total Quota Usage Server Last Login Time"
zmaccts | grep closed | grep @ | awk '{ print $1 }' | while read ACCOUNT
do
QUOTA_TOTAL=`zmprov ga ${ACCOUNT} | grep "zimbraMailQuota" | cut -d ":" -f2`
QUOTA_USAGE=`zmmailbox -z -m ${ACCOUNT} gms`
HOSTED_ON=`zmprov ga ${ACCOUNT} | grep zimbraMailHost | awk -F: '{ print $2 }'`
LAST_ON=`zmprov ga ${ACCOUNT} | grep zimbraLastLogonTimestamp: | awk -F: '{ print $2 }' `
echo "${ACCOUNT} ${QUOTA_TOTAL} ${QUOTA_USAGE} ${HOSTED_ON} ${LAST_ON} "
done
Or check the command below
zmprov ga account | grep zimbraLastLogonTimeStamp
You can check other methods? The comment below. Thank you!
Comments
Post a Comment