Results 1 to 5 of 5

Thread: Re-index mailboxes

  1. #1
    Join Date
    Aug 2006
    Location
    Austin, TX
    Posts
    51
    Rep Power
    9

    Exclamation Re-index mailboxes

    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!

  2. #2
    Join Date
    Feb 2007
    Location
    Sioux Falls, SD
    Posts
    67
    Rep Power
    8

    Default

    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?
    Last edited by dustys; 04-30-2008 at 07:50 PM.
    CoSentry - www.cosentry.com - Co-Location & Business Resiliency Solutions

  3. #3
    Join Date
    Aug 2006
    Location
    Austin, TX
    Posts
    51
    Rep Power
    9

    Default

    I just ended up creating a script called "reindex_mailboxes". Basically it is simply the following:

    for i in `zmprov gaa -s <mailbox_server_name>`
    do
    echo "reindexing $i"
    zmprov rim $i start
    done

    Whether that slams your I/O or not, I can't say that I've really noticed - though I only run it overnight.

  4. #4
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    777
    Rep Power
    9

    Default

    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.

  5. #5
    Join Date
    Dec 2007
    Location
    Melbourne/Australia
    Posts
    8
    Rep Power
    7

    Default Reindex without Thrashing the server.

    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

Similar Threads

  1. [SOLVED] Major Zimbra+ Thunderbird Problem
    By JoshuaPrismon in forum Administrators
    Replies: 8
    Last Post: 10-17-2007, 08:58 AM
  2. 4.0.4 to 4.5.6 upgrade failed in network edition
    By chenthil in forum Administrators
    Replies: 1
    Last Post: 08-27-2007, 10:36 AM
  3. [SOLVED] Simple backup question...
    By dameron in forum Administrators
    Replies: 3
    Last Post: 08-25-2007, 10:36 PM
  4. Error message in Server status
    By Max Ma in forum Installation
    Replies: 20
    Last Post: 04-19-2007, 09:55 AM
  5. The mailbox and mta dies in FC4 GA version
    By meikka in forum Installation
    Replies: 72
    Last Post: 03-16-2006, 05:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •