afterlogic / webmail-lite-8

Open-source webmail script for existing IMAP server

Home Page:https://afterlogic.org/webmail-lite-8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Searching emails - issue when orthography

MrShippeR opened this issue · comments

Hello,
i think problem is about formating search sentence to mail hosting. There is probably missing support of UTF-8. Could someone who understant problematic fill the gap and edit code to support UTF-8, please?

I get error:
Neznámá chyba. (TAG6 NO SORT: mtd: internal error: SEARCH Syntax error (Bad token)

when I try to search any word with czech orthography like "česko" = czech
Snímek z 2020-11-02 22-24-37

This might actually be caused by UTF8 support missing for search on mail server side. To look into this further, we'd need debug logs recorded when performing IMAP search.

Debug log in attachment for search word "česko". Thank you for your helping.
log-2020-11-03.txt

Email provider is seznam.cz. I'm using domain email.cz there, but domain shouldn't matter.
Setting for email client is here. For case of duplication my situation.

Indeed, it looks like this particular mail server doesn't support UTF8 search, you may wish to contact their support in this regard.
On our own server, using WebMail Lite live demo, such a search is performed just fine.

Seems they are using RFC 2822 or RFC 5322

Please, where can I find line of used formating and replace UTF-8 by one of these?
[07:01:45.66][52fe9649] IMAP[DATA]: > TAG6 UID SORT (REVERSE ARRIVAL) UTF-8 OR OR OR FROM "česko" TO "česko" CC "česko" SUBJECT "česko"\r\n

  • this line saved in log

getMessagesInfo function in modules/Mail/Managers/Main/Manager.php file would be a starting point.

By the way, you can try replacing the following line therre:

bUseSortIfSupported = $oImapClient->IsSupported('SORT'); 

with:

bUseSortIfSupported = false; 

There's a chance this will help, if mail server can't handle SORT but can do simple SEARCH.