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 03-23-2010, 12:35 AM
Member
 
Posts: 12
Default Duplicate items in sent items

Good morning gentlemen,

We're using Zimbra version 6.0.4_GA_2038.UBUNTU6_64.NETWORK 14 dec 2009, and a user reported a problem about duplicate emails in his sent items when he was cleaning up his mailbox.

He is not using the Zimbra connector for Outlook, he only logs on to Zimbra using the web client. If you take a look at the attached image, you can see that there are about 90.000 emails in his sent items, and you can see a lot of duplicate emails.

How is this possible, and how do I prevent this from happening?
Attached Images
File Type: jpg duplicates.jpg (66.4 KB, 43 views)
Reply With Quote
  #2 (permalink)  
Old 03-23-2010, 02:01 AM
Moderator
 
Posts: 7,928
Default

Welcome to the forums

They all appear to be from November 2009 did you have a problem with the server around that time ? You could try re-indexing the mailbox.
__________________
Reply With Quote
  #3 (permalink)  
Old 03-23-2010, 04:11 AM
Member
 
Posts: 12
Default

We didn't have any problems with the server around that time, or any problems with the server at all.

I can see that these duplicates stopped around december 2009, and I cant really see where they started, scrolling through 90000 emails takes too long. Anyway, I tried re-indexing the mailbox, but the progresbar immediately goes to 100%, and it says "0 messages re-indexed, 0 messages waiting, 0 messages failed". Is this supposed to happen? I never re-indexed a mailbox before.
Reply With Quote
  #4 (permalink)  
Old 03-24-2010, 11:39 PM
Member
 
Posts: 12
Default

Hmm, re-indexing the mailbox didn't really solve the problem, the sent items mailbox went from 90500 items to 89000 items. Are there any other ways to solve this? Can I run a script that deletes all duplicates, or all emails between two specified dates?
Reply With Quote
  #5 (permalink)  
Old 03-25-2010, 02:04 AM
Moderator
 
Posts: 7,928
Default

This may help
Code:
su - zimbra
zmmailbox -z -m user@domain.com search -l 1000000 "in:/Sent (after:03/23/10) (before:03/26/10)" | awk '{ if (NR>4) { print $2; } }'
Just change the date range to what you require. That will create a list of message ID's. Once you have that for each of those you can execute
Code:
su - zimbra
zmmailbox -z -m user@domain.com dm <message_ID>
Just remember to take a backup of the account first!
__________________
Reply With Quote
  #6 (permalink)  
Old 04-12-2010, 02:54 AM
Member
 
Posts: 12
Default

Quote:
Originally Posted by uxbod View Post
This may help
Code:
su - zimbra
zmmailbox -z -m user@domain.com search -l 1000000 "in:/Sent (after:03/23/10) (before:03/26/10)" | awk '{ if (NR>4) { print $2; } }'
Just change the date range to what you require. That will create a list of message ID's. Once you have that for each of those you can execute
Code:
su - zimbra
zmmailbox -z -m user@domain.com dm <message_ID>
Just remember to take a backup of the account first!
Thank you very much! I get a very long list of message ID's, with about 990 items. It kinda looks like this:

-142312
142279
-142275
142240
-142236
-142233
142200
-142196
-142193
142162
-142158
142122
-142115
142083
-142079

When I copy one of these message ID's to the zmmailbox command to delete these messages, the total number of items in the send item box decreases with one. I would expect this number to decrease much faster, but it only deletes one message. Is this supposed to happen?

Another thing I noticed is that I can only delete messages with a - in front of the message ID. When I delete one without a dash in front of the message ID, I get this:

zimbra@mail:/home/username$ zmmailbox -z -m user@domain.com dm 142162
ERROR: mail.NO_SUCH_MSG (no such message: 142162)
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.