Results 1 to 2 of 2

Thread: preparing for final migration

  1. #1
    Join Date
    Feb 2008
    Posts
    54
    Rep Power
    7

    Thumbs down preparing for final migration

    I am looking for an easy way to clear all email from every mailbox on zimbra prior to final migration. I have a script to delete all accounts and one to create them all (370 in all) however do not want to lose the shared folders and calendars during this cleaning process. Is there a way or command which will enable me to complete this task?
    Bill Rowland MCDST MCSA MCSE

  2. #2
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Quote Originally Posted by browland View Post
    I am looking for an easy way to clear all email from every mailbox on zimbra prior to final migration. I have a script to delete all accounts and one to create them all (370 in all) however do not want to lose the shared folders and calendars during this cleaning process. Is there a way or command which will enable me to complete this task?
    I would go with my first suggestion (A), but here's several methods:

    A) In the Admin Console GUI> COS (or individual user) > advanced tab > scroll to the bottom > and you can set:
    Email message lifetime -Number of days a message can remain in any folder before it is automatically purged.
    The default is 0; email messages are not deleted.
    Set this to 1 & all the mail will be gone after one day. Don't forget to set this back!

    Via command line interface that would be:
    su - zimbra

    COS ('default' etc)-
    Check by:
    zmprov gc COSname | grep zimbraMailMessageLifetime
    Set by:
    zmprov mc COSName zimbraMailMessageLifetime 1d

    OR User Level (but COS will be much faster for your purposes)-
    Check by:
    zmprov ga user@domain.com | grep Lifetime
    Set by:
    zmprov ma user@domain.com zimbraMailMessageLifetime 1d


    B) There's also the emptyFolder command. But if they have /Folders at the root level it doesn't help you at all because you'd have to spend time doing a 'getAllFolders' first and you "do not want to lose the shared folders and calendars during this cleaning process" (ie you don't want to empty /Calendar etc).

    zmmailbox -z -m user@domain.com emptyFolder /Inbox

    OR

    zmmailbox -a admin -p password -m user@domain.com emptyFolder /Inbox

    OR

    zmmailbox
    mbox> adminAuthenticate -u https://server.domain.com:7071 admin@domain.com password
    mbox> selectMailbox user@domain.com
    mbox user@domain.com> emptyFolder /Inbox


    C) Trash everything then set the zimbraMailTrashLifetime low

    zimbraMailMessageLifetime: 0
    zimbraMailSpamLifetime: 30d
    zimbraMailTrashLifetime: 30d
    zimbraPrefInboxReadLifetime: 0
    zimbraPrefInboxUnreadLifetime: 0
    zimbraPrefJunkLifetime: 0
    zimbraPrefSentLifetime: 0
    zimbraPrefTrashLifetime: 0

Similar Threads

  1. Replies: 10
    Last Post: 10-29-2009, 09:56 PM
  2. [SOLVED] Mail.app POP3 migration to ZCS
    By jpbuse in forum Migration
    Replies: 6
    Last Post: 04-23-2008, 03:38 PM
  3. [SOLVED] GroupWise 7.0.2 migration
    By Rich Graves in forum Migration
    Replies: 28
    Last Post: 04-17-2008, 05:13 PM
  4. Migration Wizard: Unable to Open Directory Object
    By ThorGoLucky in forum Administrators
    Replies: 15
    Last Post: 01-31-2008, 02:01 AM
  5. My migration from GroupWise - any suggestions?
    By stuartg.orion in forum Migration
    Replies: 3
    Last Post: 06-11-2007, 06:34 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
  •