Results 1 to 6 of 6

Thread: [SOLVED] How to delete all contacts from an address book

  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Rep Power
    6

    Default [SOLVED] How to delete all contacts from an address book

    For some strange reason a user have several thousand of contacts into the address book (possibly after a sync error with thunderbird), how the administrator can erase all the contacts at one time?


    Many thanks

  2. #2
    Join Date
    Feb 2009
    Posts
    9
    Rep Power
    6

    Default

    To get all contacts you can use this command

    zmmailbox -z -m user@domain gact


    To delete each contact you must get the id from the previous list and do:

    zmmailbox -z -m user@domain dct ContactID

    It's the only way that I know, you may find better options

    Regards.

  3. #3
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Oh I forgot to add, be very careful with that command as it will actually remove (i.e. they will be completely removed with no chance of recovery) all the contacts/mail etc. in the specified users account. So make sure you actually have the correct user account and the correct folder is being emptied - you should take a backup before you do it, just in case.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Join Date
    Jan 2009
    Posts
    2
    Rep Power
    6

    Default Problem solved

    Perfect!!
    With the suggest:

    /opt/zimbra/bin/zmprov sm dotproject@example.com emptyFolder /contacts

    the folder Contacts has been cleaned, many thanks for the help!

  6. #6
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    7

    Smile Delete all the contacts

    Before removal to check the number of Contacts that user have:

    [XXXX~]$ zmmailbox -z -m Username gact | grep "Id:" | wc -l

    -----

    Exported Username Contacts to a .csv file:

    [XXXX~]$ zmmailbox -z -m Username gru -o /tmp/File_name.csv /Contacts

    -----

    Removed the Address Book entries:

    [XXXX~]$ zmmailbox -z -m Username ef /Contacts

    -----

    Follow-up check to see if Address Book contains 0 Contacts now:

    [XXXX~]$ zmmailbox -z -m Username gact | grep "Id:" | wc -l
    0

    ----
    Last edited by untripathy; 03-19-2010 at 08:06 AM.

Similar Threads

  1. Contacts not in address book
    By tbovingdon in forum Zimbra Connector for Outlook
    Replies: 8
    Last Post: 04-24-2008, 07:22 AM
  2. Adding Contacts to a Shared Address Book problems
    By chalkboy in forum Administrators
    Replies: 9
    Last Post: 01-10-2008, 12:13 AM
  3. how to delete contacts that don't show up in Mac address book
    By macdesign13 in forum CalDAV / CardDAV / iSync
    Replies: 5
    Last Post: 09-26-2007, 08:18 AM
  4. [SOLVED] Zimbra not syncing properly with Address Book and iCal
    By Colin Day in forum CalDAV / CardDAV / iSync
    Replies: 4
    Last Post: 07-13-2007, 08:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •