Results 1 to 10 of 10

Thread: [SOLVED] How to perform quick bulk deletion?

  1. #1
    kumabhi is offline Active Member
    Join Date
    Mar 2010
    Posts
    28
    Rep Power
    5

    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?

  2. #2
    Matuscak is offline Trained Alumni
    Join Date
    Sep 2009
    Posts
    38
    Rep Power
    5

    Default

    Zmmailbox

    # su – zimbra
    # zmmailbox -z -v -m user@example.com emptyFolder /Junk

  3. #3
    kumabhi is offline Active Member
    Join Date
    Mar 2010
    Posts
    28
    Rep Power
    5

    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?

  4. #4
    Hivos's Avatar
    Hivos is offline Advanced Member
    Join Date
    Aug 2009
    Location
    The Hague -- The Netherlands
    Posts
    214
    Rep Power
    6

    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.

  5. #5
    kumabhi is offline Active Member
    Join Date
    Mar 2010
    Posts
    28
    Rep Power
    5

    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?

  6. #6
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    That is the whole purpose of it

  7. #7
    bdial's Avatar
    bdial is offline Moderator
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    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.

  8. #8
    kumabhi is offline Active Member
    Join Date
    Mar 2010
    Posts
    28
    Rep Power
    5

    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??

  9. #9
    bdial's Avatar
    bdial is offline Moderator
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    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.

  10. #10
    kumabhi is offline Active Member
    Join Date
    Mar 2010
    Posts
    28
    Rep Power
    5

    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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 04-20-2009, 06:23 PM
  2. Quick meeting no longer books resource on location
    By sander in forum Administrators
    Replies: 0
    Last Post: 01-21-2009, 03:20 AM
  3. Bulk provisioning zimlet
    By sn00p in forum Administrators
    Replies: 1
    Last Post: 12-02-2008, 09:48 PM
  4. Can messages be moved in bulk?
    By bsnyder in forum Users
    Replies: 5
    Last Post: 10-30-2008, 12:10 PM
  5. FC4 working - suggest update quick start guide
    By interoperate in forum Installation
    Replies: 9
    Last Post: 10-27-2005, 03:31 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
  •