Reset contact Autocomplete ranking

Revision as of 18:29, 3 June 2015 by Ajcody (talk | contribs) (Resolution)

Admin Article

Article Information

This article applies to the following ZCS versions.

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

Reset contact Autocomplete ranking and delete a single contact using zmsoap


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


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 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
zmprov fc account USERNAME@DOMAIN.COM

Note: Replace 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
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
  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 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 s -v -t cont in:"\"Emailed Contacts"\"
     "hits": [{
          "date": 1433256253000,
          "email": "",
          "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 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: 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