GNOME Bugzilla – Bug 668247
Broken non-basic-latin folder name handling
Last modified: 2013-09-14 16:55:22 UTC
Moving this from a downstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=782878 Description of problem: evolution has stopped processing imap folders with non-basic-latin names For example when I try to check my 'Sent' folder (Éléments envoyés in French) evo freezes and displays a yellow bar stating : Erreur durant Actualisation du dossier « Éléments envoyés ». Dossier non trouvé : Ãléments envoyés (can not refresh folder « xxx ». Folder not found yyy) With another folder called “Dépenses” I have the same error: Erreur durant Actualisation du dossier « Perso/Dépenses ». Dossier non trouvé : Perso/Dépenses This is typical UTF-x mangling This setup has been working for years and the same folders export fine on the local webmail Version-Release number of selected component (if applicable): evolution-3.3.4-1.fc17.x86_64 using imapx backend imap server: dovecot-2.1-0.3.rc1.fc17.x86_64 dovecot-pigeonhole-2.1-0.3.rc1.fc17.x86_64
I just tried to reproduce this with an IMAPx account on a non-dovecot server with your exact folder names which I created through WEB UI of the server and there doesn't happen any folder mangling, the folder is properly updated. Could you retest with 3.4.0 or 3.4.1, please? Also, in case it'll be still reproducible on your side, could you run evolution link this: $ CAMEL_DEBUG=imapx evolution &>log.txt and then enter the folder, please? The log should contain the information which was passed between evolution and the server, thus showing us whether the imapx or server garbled the folder name.
Nicolas, can you please provide requested information as per comment#1 ?
Argh, sorry for the delay the request had fallen through the cracks I've sent the requested info to both of you by private mail since I'd rather not have this level of personal info hanging on a public bugzilla. evolution-3.5.2-2.fc18.x86_64 dovecot-2.1.7-2.fc18.x86_64
Thanks for the email. I'm pasting relevant parts of that log here: The server capabilities: [imapx:O] camel_imapx_read: buffer is 'O00271 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE] Logged in ' One of the folders as received from the server: * LIST (\Subscribed) "." "Perso.D&AOk-penses" and as seen be imapx: [imapx:?] adding full name 'Perso.Dépenses' '.' [imapx:?] already there Then a STATUS request done by imapx: [imapx:P] Starting command (active=1,) P00342 STATUS Perso.D&AOk-penses (MESSAGES UNSEEN UIDVALIDITY UIDNEXT HIGHESTMODSEQ) [imapx:P] camel_imapx_write: 'P00342 STATUS Perso.D&AOk-penses (MESSAGES UNSEEN UIDVALIDITY UIDNEXT HIGHESTMODSEQ) ' [imapx:P] camel_imapx_read: buffer is '* STATUS {15} Perso.Dépenses (MESSAGES 3419 UIDNEXT 4263 UIDVALIDITY 1232478056 UNSEEN 9 HIGHESTMODSEQ 3880) P00342 OK Status completed. ' Notice the server returned folder name in the UTF8 encoding, instead of the escaped form, thus imapx code re-encoded it later to [imapx:?] find_full: comparing namespace '' to name 'Perso.Dépenses' [imapx:P] Got folder path 'Perso/Dépenses' for full 'Perso.Dépenses' [imapx:P] Received STATUS for unknown folder 'Perso.Dépenses' which failed to work properly. I see two possible fixes: a) either the server should return folder names always encoded, even in the STATUS response b) or the imapx code should check whether it can convert text or not, to not re-encode UTF8 strings
Created attachment 216182 [details] [review] eds patch; for evolution-data-server; There was a bug in camel's utf7 decoder, when it was not decoding anything, then it pushed read char as unichar, which made from it, in case of utf8 char (part of utf8 letter), a broken string. Interestingly, this bug is there since the function exists, 2002-08-28 - commit 2095e8ca.
Created commit 486113c in eds master (3.5.3+) Created commit 777c487 in eds gnome-3-4 (3.4.3+)