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

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-17-2009, 11:38 AM
New Member
 
Posts: 4
Cool [SOLVED] Message count incorrect after multiple runs of IMAPSync using --delete2 &amp

Hello, this is my first forum post so sorry if I missed something when searching the forums, wiki, and bugzilla to find a resolution to my situation -- though I do see quite a bit posted that's in relation to this in one way or another.

We recently migrated from IMail to Zimbra Open Source using the IMAPSync utility version 2.2.9. We've been running fine for over a week but have just noticed an issue related to the migration. We had to run IMAPSync on multiple occasions with the parameters to remove mail from the Zimbra system that was no longer on the IMail system (--delete2 --expunge2). It appears those messages that were supposed to be removed were just tagged with \deleted because we're finding many accounts show a message count in the web interface that is over what actually appears in the folder.

I tried reindexing & recalculating mailbox counts but that did not matter since the messages are hidden with the \deleted tag.

I also tried setting the purge for these accounts to 1 hour and ensuring the wait time between purges was set (it is, to default 1 min), but that also did not remove the messages in order to display the correct message count.

The empty trash option from the web interface is grayed out so that is also not an option because no mail is actually in that folder.

I read on this post that compacting the mailbox using Thunderbird for their IMAP users worked, however our users are POP users, the only IMAP involvement was with the IMAPSync tool. Not to mention there are at least a 1000 accounts and it is unknown at this time how many are affected so the option of setting up a user account in Thunderbird to do this task is beyond undesirable.

How can I go about clearing those \deleted messages that were a result of multiple runs of IMAPSync? I can't rerun IMAPSync because we're in production now and the former IMail server has already been decommissioned, and I don't know that it'd make a difference considering I already used the parameters that were supposed to expunge these messages in the first place. This is causing a problem for some of our users because the \deleted messages are counting against their overall quota. Is there a command I can run to expunge messages for all accounts tagged with \deleted?
Reply With Quote
  #2 (permalink)  
Old 07-18-2009, 01:41 AM
Moderator
 
Posts: 7,911
Default

Welcome to the forums

If you go into /opt/zimbra/store are you able to identify one of the messages that has been marked as deleted and post the headers ?
__________________
Reply With Quote
  #3 (permalink)  
Old 07-19-2009, 02:38 PM
New Member
 
Posts: 4
Default

Thanks!

Well, I tried to figure out what messages in my personal account would have been deleted on the IMail system and therefore marked as deleted on the Zimbra system but I would just be guessing if I posted the headers for one I suspected as fitting that description. As far as I can see there's nothing I can grep out of the messages listed under my account ID that would show it as being marked for deletion. Doing "grep -i deleted *" just returns message body text, not flag status. Doing a grep on status just returns status listing that show read or unread (r or u), not x that should signify marked as deleted (as stated here)

I've continued searching forums, etc and can only assume the flag information is somewhere else, perhaps in the SQL database (which I'm not sure how to search).

I also ran across some bug information stating a fix for removing IMAP deleted messages if you empty trash using SOAP but I don't know how to do that either (and for the life of me I can't find that bug article now).
Reply With Quote
  #4 (permalink)  
Old 07-20-2009, 07:31 AM
New Member
 
Posts: 4
Default

OK so on the chance that my personal account was not truly affected by this issue even though the inbox count did not match what was visible, I deleted mail from all folders via the web interface & emptied the trash. It turns out my account is indeed not affected. I will have to find another account that is as the client account that originally alerted us to this problem was removed & readded to resolve it since it was causing quota issues.

I would still like to know if there is a way to remove items flagged/tagged with \Deleted from the command line interface so I can do this for the next account that we find has this issue since the messages are hidden in the web interface.

Thanks!
Reply With Quote
  #5 (permalink)  
Old 07-20-2009, 07:39 AM
Moderator
 
Posts: 7,911
Default

If you look into the MySQL database
Code:
su - zimbra
mysql
show databases
use mboxgroup1;
show tables;
desc imap_folder;
desc imap_message;
You will see the schema for how IMAP messages are held. If you can find a account that has the duplicated emails you should be able to see how the flags are set in MySQL. Then perform a query against the tables and pull out which folder they are stored in on the filesystem and the associated message ID.
__________________
Reply With Quote
  #6 (permalink)  
Old 07-20-2009, 08:37 AM
New Member
 
Posts: 4
Default

Awesome, thanks!
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.