[horde] imap search: missing CHARSET UTF-8 string
Michael M Slusarz
slusarz at horde.org
Tue Apr 8 07:04:34 UTC 2014
Quoting Stephan Lauffer <lauffer at ph-freiburg.de>:
> Hello!
>
> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>> Quoting Stephan Lauffer <lauffer at ph-freiburg.de>:
>>
>>> Hello!
>>>
>>> We noticed different imap search commands on different horde
>>> webgroupware installations here. One of them is adding the
>>> "CHARSET UTF-8" entry into the imap search (f.e..: "<1396253172<5
>>> UID SEARCH RETURN (ALL COUNT) CHARSET UTF-8 SUBJECT {8+}") but
>>> another installation didn't.
>>>
>>> Both of them are running on the same distribution, same version of
>>> cyrus imapd 2.4.17 and the test script detects a working utf8
>>> support. The one system whithout the utf8 string fails on searches
>>> with german umlauts and so on...
>>
>> Without an IMAP debug log of the problem server, there's not much
>> support I can provide.
>>
>> michael
>
> Hope these two logs contains enough...:
[snip]
> (2) ...and the not working one. Maybe the problem is caused by a
> result of our murder setup?
>
> <<snip>>
>
> C: 4 UID SEARCH RETURN (ALL COUNT) SUBJECT {6+}
> C: [LITERAL DATA: 6 bytes]
> C: UNDELETED
>>> Slow Command: 15,01 seconds
You need to look at the entire IMAP log from login to here. My guess
is that a BADCHARSET response happened at some point prior to this (a
badcharset response will cause all future searches to not use the
charset involved in that original search).
We always set the charset to UTF-8 on a search query in IMP (see
IMP_Imap#_search()), so the only reason I can see for a search to not
contain the charset information is if the server has previously
explicitly indicated that it doesn't support it.
Although my question is why SORT isn't being used. IIRC, SORT has
been supported by Cyrus for years, and not only does it make the
search charset issue moot (SORT requires the server to support UTF-8
for searching), it will also dramatically speed up mailbox listing.
There's not enough information in the logs given to determine if SORT
is not available or if it is not being used for some other reason,
such as the fact that you are sorting by display name.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the horde
mailing list