Reset contact Autocomplete ranking

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 8.6 Article ZCS 8.6 ZCS 8.5 Article ZCS 8.5 ZCS 8.0 Article ZCS 8.0


Reset contact Autocomplete ranking and delete a single contact using zmsoap

Purpose

Customer would like to reset contact Autocomplete ranking to get rid of a duplicate lookup.

Resolution

Autocomplete ranking is stored in the mysql database. To reset it, use the following SOAP command line:

  • Reset ranking table data:-
su - zimbra
zmsoap -z -m user@domain.com RankingActionRequest/action @op=reset

Now login to ZWC and see if the duplicate issue is resolved. If not, then you might need to proceed with the following steps.

  • Remove all contacts from "Emailed Contacts" folder:-
zmmailbox -z -m USERNAME@DOMAIN.COM ef /"Emailed Contacts"
  • Now flush the account cache:-
zmprov fc account USERNAME@DOMAIN.COM

If you want to delete a single contact instead of resetting the complete ranking table, then use the following commands:-

zmsoap -z -m USERNAME@DOMAIN.COM RankingActionRequest/action @op=delete @email=ANONYMOUS@gmail.com
zmprov fc account USERNAME@DOMAIN.COM

Note: Replace ANONYMOUS@gmail.com with that contact which you want to delete from the ranking table.

From The CLI To Get More Details

First, ssh to the mailstore that the user resides on. Then do:

$ zmprov gmi user1@example.com
mailboxId: 6
quotaUsed: 6028

Now, we can query mysql for the ranking table data as it exist for that user by using the mailboxId.

$ mysql -e "select * from zimbra.mailbox_metadata WHERE mailbox_id=6 AND section LIKE '%CONTACT_RANKINGS%'\G"

*************************** 1. row ***************************
mailbox_id: 6
   section: CONTACT_RANKINGS
  metadata: d29:share-dl@mail-172.example.comd1:n0:1:ri1e1:ti1433256253039ee1:vi10ee

And now we can check what's in the "Emailed Contacts" folder for the user. Once we have both of these, we can compare and see if there's differences or not with the various addresses.

$ zmmailbox -z -m user1@example.com s -t cont in:"\"Emailed Contacts"\"

num: 1, more: false

     Id  Type   From                  Subject                                             Date
   ----  ----   --------------------  --------------------------------------------------  --------------
1.  262  cont   share-dl@mail-172.ex  share-dl                                            06/02/15 10:44

In this case, both are consistent. If you would rather see the full contact information and not have it cut off for the formatting, you can do:

$ zmmailbox -z -m user1@example.com s -v -t cont in:"\"Emailed Contacts"\"
{
     "hits": [{
          "date": 1433256253000,
          "email": "share-dl@mail-172.example.com",
          "fileAsStr": "share-dl",
          "folderId": "13",
          "id": "262",
          "revision": "3122",
          "sortField": "1433256253000"
     }],
     "more": false,
     "offset": 0,
     "sortBy": "dateDesc"
}

In summary, first try the reset option and see if the duplicate issue is resolved. If not, then you might need to delete the data as it is in the "Emailed Contacts" folder. The steps above will allow you to compare the data more closely if your uncomfortable with deleting the contacts stored in the "Emailed Contacts" folder. Note, you can also easily adjust the zmmailbox string to search against other Contact folders if you want to confirm if an address does exist in their other folders as well. To get the folder names, just do :

$ zmmailbox -z -m user1@example.com gaf
        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  unkn           0           0  /
        16  docu           0           0  /Briefcase
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
         7  cont           0           0  /Contacts
         6  mess           0           0  /Drafts
        13  cont           0           1  /Emailed Contacts
         2  mess           1           1  /Inbox
         4  mess           0           0  /Junk
         5  mess           0           1  /Sent
       260  mess           0           0  /Shared
        15  task           0           0  /Tasks
         3  unkn           0           0  /Trash

Additional Content


Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 04/15/2015
Article ID: https://wiki.zimbra.com/index.php?title=Reset_contact_Autocomplete_ranking Date Modified: 2015-06-03



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Wiki/KB reviewed by SME1 SME2 Jenny Jarrard Last edit by Ajcody
Jump to: navigation, search