Results 1 to 6 of 6

Thread: [SOLVED] Message count incorrect after multiple runs of IMAPSync using --delete2 &amp

  1. #1
    Join Date
    Jul 2009
    Location
    Houston, TX
    Posts
    4
    Rep Power
    6

    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?

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    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 ?

  3. #3
    Join Date
    Jul 2009
    Location
    Houston, TX
    Posts
    4
    Rep Power
    6

    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).

  4. #4
    Join Date
    Jul 2009
    Location
    Houston, TX
    Posts
    4
    Rep Power
    6

    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!

  5. #5
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    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.

  6. #6
    Join Date
    Jul 2009
    Location
    Houston, TX
    Posts
    4
    Rep Power
    6

    Default

    Awesome, thanks!

Similar Threads

  1. 'Couldn't access Yahoo! Zimbra Desktop server"
    By chirag1 in forum Error Reports
    Replies: 37
    Last Post: 06-12-2011, 05:14 PM
  2. [SOLVED] Zimbra desktop slowed down the system
    By hvle in forum General Questions
    Replies: 5
    Last Post: 03-23-2009, 05:32 PM
  3. Emails bouncing with "Error Text: 401,'null'"
    By sholden in forum Zimbra Connector for Outlook
    Replies: 27
    Last Post: 08-20-2008, 04:59 PM
  4. Incorrect New Message Count
    By andreychek in forum Administrators
    Replies: 6
    Last Post: 08-26-2006, 01:07 PM
  5. Replies: 4
    Last Post: 08-10-2006, 10:55 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
  •