Reindex Zimbra Mail Boxes
Reindex Zimbra Mail Boxes
Sometimes, Zimbra email server may response very slow.
Reindexing all the mailboxes may solve this.
Run the following shell script as zimbra user.
<code>
#!/bin/bash # Get list of mail accounts and reindex each one for i in `zmprov -l gaa -s server.yourdomain.com` do echo -n "Reindexing $i" # Start reindexing zmprov rim $i start >/dev/null # Check if the rendix is still running for this account while [ `zmprov rim $i status|wc -l` != 1 ] do # Sleep for 2 seconds before checking status again echo -n . && sleep 2 done echo . done
</code>
To reindex a particular user’s mailbox.
run this as zimbra user.
# su - zimbra # zmprov rim username start # zmprov rim username status