View Single Post
  #27 (permalink)  
Old 11-29-2010, 06:43 PM
John Munro John Munro is offline
Senior Member
 
Posts: 50
Default

Following the closure of Bug 40081 – Unable to get rid of emailed contact this is still happening for us on 6.0.9 NE despite the entry not being in the address book. Perhaps due to a corrupt entry in the metadata field:
(sanitized)
Quote:
...ntag1:ri69e1:ti1290662525228ee19:sss@domain.ac. jpd1:n122r. Michael SSS", aaa@domain.ac.jp, ggg@domain.ac.jp, "Alexander GGG" <ggg@domain.ac.jp>, "Edda KKK1:ri12e1:ti1290668940981ee36:taka...
This produces the following JSON AutoCompleteResponse when autocompleting 'sz':
Quote:
"Dr. Michael SSS", aaa@domain.ac.jp, ggg@domain.ac.jp, "Alexander GGG" <ggg@domain.ac.jp>, "Edda KKKKKK" <sss@domain.ac.jp>
Clicking the 'Remove' link results in a message saying:
The ranking of address ggg@domain.ac.jp has been reset. Addresses are ranked based on how often you have sent to them.

However it is sss@domain.ac.jp that needs to be removed!

We have set:
Code:
zmprov ma problem_account zimbraContactRankingTableSize 0
for four days now without the metadata being cleared out.

I wish to clear this up quickly so I need to confirm the correct mysql UPDATE command to zero out the metadata field.

From comment 11 in Bug 43772 - Autocomplete / Emailed contacts error the table structure is:

Code:
*************************** 1. row ***************************
  Field: mailbox_id
   Type: int(10) unsigned
   Null: NO
    Key: PRI
Default: 0
  Extra: 
*************************** 2. row ***************************
  Field: section
   Type: varchar(64)
   Null: NO
    Key: PRI
Default: 
  Extra: 
*************************** 3. row ***************************
  Field: metadata
   Type: mediumtext
   Null: YES
    Key: 
Default: NULL
  Extra:
The SELECT command is:
Code:
su - zimbra
mysql
SELECT metadata FROM zimbra.mailbox_metadata WHERE mailbox_id=44 AND section='CONTACT_RANKINGS';
After some testing on a test server, the following seems to work:
Code:
UPDATE zimbra.mailbox_metadata SET metadata='' WHERE mailbox_id=44 AND section='CONTACT_RANKINGS';
Of course the mailbox_id needs to match the id of the problem mailbox. The mailbox_id can be found with:
Code:
zmprov gmi problem_child@domain.com
This does seem to zero out the appropriate data in the rankings and new data seems to be correctly added to it upon subsequent email sending.

However, I am concerned about any possible side effects (i.e. indexes out of sync) of directly modifying the data. Can anyone comment?
Reply With Quote