Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Users

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 01-18-2009, 01:27 PM
Starter Member
 
Posts: 2
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
Reply With Quote
  #2 (permalink)  
Old 02-05-2009, 05:32 AM
Junior Member
 
Posts: 9
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.
Reply With Quote
  #3 (permalink)  
Old 02-05-2009, 06:43 AM
Zimbra Consultant & Moderator
 
Posts: 19,653
Default

ZCS 4.5.x Mass delete of Contacts - Zimbra :: Wiki
__________________
Regards


Bill
Reply With Quote
  #4 (permalink)  
Old 02-05-2009, 06:51 AM
Zimbra Consultant & Moderator
 
Posts: 19,653
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
Reply With Quote
  #5 (permalink)  
Old 02-05-2009, 02:47 PM
Starter Member
 
Posts: 2
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!
Reply With Quote
  #6 (permalink)  
Old 11-22-2009, 11:19 AM
Junior Member
 
Posts: 5
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 09:06 AM..
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.