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 Search this Thread Display Modes
  #1 (permalink)  
Old 07-27-2009, 12:29 PM
Junior Member
 
Posts: 6
Default Imported emails invisible

Hello,

After migrating and porting mails to zimbra one of the accounts is missing a lot of mails from the old server. An error when using imapsync must have gone unobserved. The license for the old server is expired, so I retrieved the mails from the backup (.eml files). In the preference tab I'd noticed that you could import an account as a tgz file. I prepared a tgz file with the directory structure intact and uploaded the file with only "mail" checked. After hitting the "Import" button I went home for dinner - thinking that maybe I should have tried with a little less than a 1.2 GB archive.... Anyway, zimbra has processed the archive and the directory structure is present in the folder I selected for import. The directory displays all the mails as unread - but when i select a folder, the index come up empty. Tried to reindex with no success. Snooping around in the message store, the messages seems to be there.

Any ideas? what to look for?

/Ole
Reply With Quote
  #2 (permalink)  
Old 07-29-2009, 01:24 AM
Junior Member
 
Posts: 6
Default

Connecting to the account with Outlook (using imap), I can see all the messages. But they are all marked for deletion and flagged. Removing the deletion makes them visible in the web client. There are close to 20.000 mails arranged in more than 200 folders/subfolders. Is there a way to recursively remove the 'mark for deletion', 'mark as read', and 'unflag' all mails in a subfolder?

/Ole
Reply With Quote
  #3 (permalink)  
Old 07-29-2009, 01:29 AM
Moderator
 
Posts: 7,928
Default

[SOLVED] Message count incorrect after multiple runs of IMAPSync using --delete2 &amp
__________________
Reply With Quote
  #4 (permalink)  
Old 07-29-2009, 05:27 AM
Junior Member
 
Posts: 6
Default

Ok - getting my hands dirty with sql queries...

With a little help from this page:

http://wiki.zimbra.com/index.php?tit...base_structure

..and a lot of help from pure guessing - I ran this query:

UPDATE mail_item SET flags = '0', unread = '0' WHERE folder_id > '7437' AND type = '5';

Assumptions (the mother of all f***ups): type '5' seems to be a email message. folder_id is the folder the item is placed in. So selecting anything that is placed in a folder created after the folder created for import and type 5, will select all the inmported emails. The 'unread' seems obvious - so clearing that one. 'flags'...hmm... not sure what the numbers mean - and I can't find any docs about it. A lot of the mails was created wit values 484 and 486. After altering the status of the mails in outlook, the value was changed to 68 (from 484). I decided to clear the flags and put '0' in there. Now the mails can be read.

Still some of the folders is displayed as if there are unread messages in them in the webclient. Outlook seems fine.

/Ole
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.