Reset contact Autocomplete ranking: Difference between revisions
Line 79: | Line 79: | ||
</pre> | </pre> | ||
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 : | 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. | ||
Here's an example of resetting the ranking table and confirming it with the mysql query. | |||
<pre> | |||
$ zmsoap -z -m user1@example.com RankingActionRequest/action @op=reset | |||
<RankingActionResponse xmlns="urn:zimbraMail"/> | |||
$ 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: d1:vi10ee | |||
</pre> | |||
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 : | |||
<pre> | <pre> |
Revision as of 18:39, 3 June 2015
Article Information |
---|
This article applies to the following ZCS versions. |
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.
Here's an example of resetting the ranking table and confirming it with the mysql query.
$ zmsoap -z -m user1@example.com RankingActionRequest/action @op=reset <RankingActionResponse xmlns="urn:zimbraMail"/> $ 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: d1:vi10ee
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
- You can see a complete SOAP information in the next Wiki article.