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-10-2010, 12:40 PM
Active Member
 
Posts: 26
Default [SOLVED] How to perform quick bulk deletion?

Right now I delete emails using IMAP for all my zimbra user accounts which takes hell lot of time and resource intensive. Is there a command line method to bulk delete emails quickly?
Reply With Quote
  #2 (permalink)  
Old 03-10-2010, 01:21 PM
Trained Alumni
 
Posts: 31
Default

Zmmailbox

# su – zimbra
# zmmailbox -z -v -m user@example.com emptyFolder /Junk
Reply With Quote
  #3 (permalink)  
Old 03-10-2010, 08:11 PM
Active Member
 
Posts: 26
Default

Thanks for the reply ! I should have been more clear, what I meant to ask is the following: Is it advisable to delete messages directly using rm from zimbra mail store, this way I don't need to write the above command for every mailbox. If its possible, how to go about doing it?
Reply With Quote
  #4 (permalink)  
Old 03-11-2010, 01:18 AM
Advanced Member
 
Posts: 192
Default

I'd not advise using rm from the cli, it will mess up the index in mysql.

Perhaps you could set the "E-mail message lifetime" in your CoS. This will delete all email older than xx days.
Reply With Quote
  #5 (permalink)  
Old 03-11-2010, 03:46 AM
Active Member
 
Posts: 26
Default

Thanks for the reply ! Again it brings me down to my original question is old email deletion algorithm used by Zimbra scalable for large number of mail accounts? i.e. email older than X days are deleted for all the mailboxes within a reasonable timeframe?
Reply With Quote
  #6 (permalink)  
Old 03-11-2010, 04:47 AM
Moderator
 
Posts: 7,928
Default

That is the whole purpose of it
__________________
Reply With Quote
  #7 (permalink)  
Old 03-11-2010, 04:52 AM
Moderator
 
Posts: 1,554
Default

i'm not exactly sure what the algorithm is, but it's designed to scale. i know it only purges a few accounts at a time, so if you have 1000 accounts it's not going to try to purge all of them at once of messages odler than X days. You can set the interval at which the purge runs too. so if you have a lot of users, and your purge interval is pretty large, it could take a while to do the purging.
Reply With Quote
  #8 (permalink)  
Old 03-11-2010, 08:06 AM
Active Member
 
Posts: 26
Default

Thanks for the reply! OK...I was wondering if it finds out which accounts have emails older than X days beforehand instead of attempting to purge all the accounts that would save lots of time and computations(also meaningless purge attempts of accounts with only new mails)...By "purges a few accounts at a time" you mean parallel purges of accounts??
Reply With Quote
  #9 (permalink)  
Old 03-11-2010, 09:14 AM
Moderator
 
Posts: 1,554
Default

ok i took at look at my server and figured it out, it goes by the config option

zimbraMailPurgeSleepInterval: 1m

so every 1min it purges only 1 account, you'll see messages in the mailbox log like

Code:
2010-03-11 12:02:35,786 INFO  [MailboxPurge] [name=user1@domain.com;mid=151;] mailop - Deleting items: 3124,3207,3230,3232,3233,3234,3235,3236.
2010-03-11 12:03:35,884 INFO  [MailboxPurge] [name=user2@domain.com;mid=152;] mailop - Deleting items: 72079.
Reply With Quote
  #10 (permalink)  
Old 03-13-2010, 07:39 AM
Active Member
 
Posts: 26
Default

I tried setting option for deleting old emails in the email retention time period through web interface. However it says that period should be greater than 30 days !! Now I am stuck, I definitely want it to happen sooner than that, one option I have is IMAP based deletion(slow), is there any faster option available?
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.