Results 1 to 6 of 6

Thread: moving mails inside the store directory

  1. #1
    Federico is offline Junior Member
    Join Date
    Oct 2009
    Posts
    7
    Rep Power
    5

    Question moving mails inside the store directory

    Hi all,

    I have this kind of trouble: I have to recover a mailbox from a corrupted backup of Zimbra (Release 6.0.1_GA_1816.DEBIAN5_64 DEBIAN5_64 FOSS edition).

    The original mailbox (~850MB) has the store located in /opt/zimbra/store/0/18/

    I need to move email inside this account to /opt/zimbra/store/0/89/

    I can't use imapsync or something because the account with id 18 is gone: no logins are associated with it and there are no trails of it in the database, so I have to operate at filesystem level.

    I tried to copy (cp -R) the content of /opt/zimbra/store/0/18/msg/* into /opt/zimbra/store/0/89/msg/ and then reindexing the account, but it fails with:

    # zmprov rim account@domain status
    ERROR: service.NOT_IN_PROGRESS (mbox e119ff5c-745f-4c2f-bcb7-0ba1fb04f326 is not currently running action ReIndex)


    Any suggestions will be appreciated.

  2. #2
    ArcaneMagus's Avatar
    ArcaneMagus is offline Moderator
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    That "error" you posted actually just means that the ReIndex process isn't running. You should see it when you open the ReIndex dialog, and when it finishes reindexing the account. But this won't solve your problem as simply placing message files in the store and reindexing an account doesn't put them in the database for that account.

    What you are looking for is "zmmailbox addMessage". You can see the usage for that from "zmmailbox help message", and examples of it's use by searching the forum.

  3. #3
    Federico is offline Junior Member
    Join Date
    Oct 2009
    Posts
    7
    Rep Power
    5

    Default

    Thank you for the reply!

    So, i tried zmmailbox but I obtain the same results of zmlmtpinject, that is to have all the emails into the Inbox, losing the original source directories.

    Is there a way recover the complete directory structure?

  4. #4
    veronica is offline Outstanding Member
    Join Date
    Jun 2008
    Posts
    594
    Rep Power
    8

    Default

    If mysql entry is gone you cant do nything rather than placing in INBOX.

  5. #5
    Federico is offline Junior Member
    Join Date
    Oct 2009
    Posts
    7
    Rep Power
    5

    Default

    Ok, thank you!

  6. #6
    ArcaneMagus's Avatar
    ArcaneMagus is offline Moderator
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    If you had done a search for examples, or ran `zmmailbox help message`, you would have found that `zmmailbox addMessage` allows you to specify the destination folder
    Here is a thread that has an example script that probably does most of what you are looking for already: Maildir to Zimbra

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] upgrading to latest 4.5 release
    By ak2009 in forum Installation
    Replies: 6
    Last Post: 01-17-2009, 09:08 AM
  2. Zimbra OSS 4.5.11 Re-install
    By newmember in forum Installation
    Replies: 0
    Last Post: 09-09-2008, 10:26 PM
  3. centos 5 zimbra 4.5.6 no statistics
    By rutman286 in forum Installation
    Replies: 9
    Last Post: 08-14-2007, 09:30 AM
  4. sql query to retrieve mails store path
    By banou in forum Developers
    Replies: 10
    Last Post: 05-02-2007, 06:53 AM
  5. Moving Mails from one store to another
    By chh in forum Administrators
    Replies: 3
    Last Post: 11-08-2006, 07:17 AM

Posting Permissions

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