Page 1 of 1
Posted: Tue Oct 23, 2007 4:38 pm
Is there a way to reindex ALL mailboxes on a server? I know you can reindex a single mailbox via the Admin interface, but we need to be able to reindex all of them on a server (several 100) and doing them one by one via the interface would be extremely painful!
Posted: Wed Apr 30, 2008 8:33 pm
I am running into an issue after a migration to a new mailbox server where we have a mailboxes that 'looses' messages. The fix seems to be reindexing a problem mailbox (as pointed to in other posts).
Has anyone found a way to re-index all mailboxes without completely burying my server's IO or having to do it by hand?
Posted: Fri May 02, 2008 3:18 pm
I just ended up creating a script called "reindex_mailboxes". Basically it is simply the following:
for i in `zmprov gaa -s `
echo "reindexing $i"
zmprov rim $i start
Whether that slams your I/O or not, I can't say that I've really noticed - though I only run it overnight.
Posted: Sun May 04, 2008 3:05 pm
It can easily slam your disk and CPU i/o. I did the same, but I put a "sleep 120" between each one to space it out a bit. I didn't care how fast it got done, I just needed it to get done for all accounts, so I let that run in the background and it worked itself up without doing them all at the same time.
Posted: Fri May 11, 2012 10:25 am
# Get list of mail accounts and reindex each one
for i in `zmprov -l gaa -s server.yourdomain.com`
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 ]
# Sleep for 2 seconds before checking status again
echo -n . && sleep 2