Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-26-2009, 12:34 PM
New Member
 
Posts: 4
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.
Reply With Quote
  #2 (permalink)  
Old 10-26-2009, 12:51 PM
Moderator
 
Posts: 778
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.
Reply With Quote
  #3 (permalink)  
Old 10-26-2009, 04:57 PM
New Member
 
Posts: 4
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?
Reply With Quote
  #4 (permalink)  
Old 10-26-2009, 11:25 PM
Elite Member
 
Posts: 371
Default

If mysql entry is gone you cant do nything rather than placing in INBOX.
Reply With Quote
  #5 (permalink)  
Old 10-27-2009, 08:06 AM
New Member
 
Posts: 4
Default

Ok, thank you!
Reply With Quote
  #6 (permalink)  
Old 10-27-2009, 10:50 AM
Moderator
 
Posts: 778
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
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0