GNOME Bugzilla – Bug 738184
[IMAPx] Not every server returns empty namespace prefix for INBOX
Last modified: 2014-10-23 14:53:31 UTC
Ubuntu 14.04.1 LTS, Gnome 3.12.2, Evolution 3.12.6. When attempting to mark all messages as read in the 'Inbox' folder Evolution shows the following error: Failed to mark messages as read. The reported error was "No IMAP namespace for folder path 'INBOX'". It only reports this error when trying to mark all messages in 'Inbox' as read, all other folders work properly. All Maildir folders are in the correct '.' format and the 'cur', 'new' and 'tmp' folders for 'Inbox' are there. Individual messages can be marked as read in the message list pane.
Thanks for a bug report. I would ask for a similar information like at yours bug #737733, but there is no need to duplicate it, thus I'll wait for it there.
From your log at bug #737733: > [imapx:A] I/O: 'A00003 LIST "" "INBOX.*"' > ..... > * LIST (\HasChildren) "." "INBOX.Bind" > * LIST (\HasNoChildren) "." "INBOX.directory" > * LIST (\HasNoChildren) "." "INBOX.SaneSecurityAnn" > ..... > A00003 OK LIST completed' > [imapx:A] I/O: 'A00004 LSUB "" "INBOX.*"' > ..... > * LSUB (\HasChildren) "." "INBOX.Bind" > * LSUB (\HasNoChildren) "." "INBOX.SaneSecurityAnn" > ..... > A00004 OK LSUB completed' > ..... > ..... > [imapx:A] I/O: 'A00472 STATUS INBOX.directory (MESSAGES UNSEEN UIDVALIDITY UIDNEXT)' > [imapx:A] I/O: 'A00472 NO Mailbox does not exist, or must be subscribed to.' The LIST command returns all known folders on the server, while LSUB returns only those subscribed. The subscriptions are handled and stored on the server. The INBOX.directory folder is only in the LIST response, thus it exists, but is not subscribed. You might see it in Folder->Subscriptions-><that IMAP account> unchecked, which means it is not subscribed. If I recall correctly you said you tried to subscribe to it, but it didn't work. I guess the server didn't save it for some reason (if you did in in the Subscriptions dialog in Evolution). I do not have enough information to know whether the bug is in Evolution or in the Server, but if it's something with the server, then you can workaround it by letting evolution show you only subscribed folders, which is in Edit->Preferences->Mail Accounts-><IMAP Account>->Edit->Receving Options tab->[x] Show only subscribed folders. With that the unsubscribed folders will not be visible in UI and will not be checked for as well. Please verify the above, and if you cas see the INBOX.directory (in Evolution as Inbox/directory) in Subscriptions dialog, then capturing a log where you'll subscribe to it in the same was as the log at bug #737733 may show whether the server acknowledged folder subscription and then just forgot of it or whether there's a bug in Evolution.
Created attachment 288215 [details] Screenshot of subscribed folders This screenshot shows that the INBOX directory is subscribed to . If it wasn't none of the subfolders would show up
The logfile was too large to upload here so I've uploaded it onto PasteBin. http://pastebin.com/WpP1rrLi While the log was running I unsubscribed to INBOX waited a few seconds then then resubscribed to it. I've also made the setting change in the accounts receiving options to only show subscribed folders prior to running the log command. Would a log from the IMAPD daemon help at all?
(In reply to comment #3) > This screenshot shows that the INBOX directory is subscribed to . If it wasn't > none of the subfolders would show up It's not "Inbox" doing trouble, it's "Inbox/directory" in trouble. I mean, the folder's name is "directory" under "Inbox". That's what the server returns in the LIST response. You should type in the Search field "directory", not "Inbox". (It reminded me of all the movies making jokes from similar misunderstandings between actual names and general "names" for items or such.) :)
Thank you for clarifying that. Per the screenshot at first 'INBOX/directory' was not checked. I checked it, restarted Evo and still get the same error.
Created attachment 288225 [details] INBOX/directory subscription Was not checked when I checked. I checked it, restarted EVO and same error persisted.
Does the subscription persist between Evolution's restarts? If not, then the server may forget it for some (unknown to me) reason. We can check what is happening when you subscribe the folder 'directory' when you run evolution with debugging on. The only relevant/interesting part of the log would be when you check the folder for the subscription, thus running evolution with debugging on, filter the folder list for the 'directory' and then wait till the connection activity settles, after which delete everything from the log file and only then tick the 'directory' for subscriptions.
(In reply to comment #0) > Failed to mark messages as read. > The reported error was "No IMAP namespace for folder path 'INBOX'". Oh, I noticed we slightly diverged from the original ^^^. Your log (at bug #737733) shows these namespaces returned from the server: > [imapx:A] I/O: 'A00002 NAMESPACE' > [imapx:A] I/O: '* NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." ".")) > A00002 OK NAMESPACE completed.' which looks correct.
I checked this morning and 'INBOX/directory' is still ticked. Why would I get the error only when trying to mark all messages in 'Inbox' as read but not in any of the subfolders?
When it's ticked then it's fine. I guess from that the side error "Mailbox does not exist, or must be subscribed to" is fixed now, right? That means that you still get the original error "No IMAP namespace for folder path 'INBOX'"? The reason for getting this for the Inbox only is that the subfolders are different, and when calling the function on subfolders it's the respective subfolders which are checked, not the Inbox folder.
Created attachment 289006 [details] [review] probable eds workaround for evolution-data-server; Maybe this will help, though it doesn't feel completely correct to ignore any errors from the STATUS command.
Comment on attachment 289006 [details] [review] probable eds workaround As we figured with Chris and Courier folks, the STATUS error is unrelated to this IMAPx specific error "No IMAP namespace for folder path 'INBOX'"
Some servers return namespaces as: > NAMESPACE (("" ".")) NIL (("Public.Lists." ".")("Public.Groups." ".")) That is for Dovecot, while other servers can return different namespaces: > NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." ".")) That is for Chris' Courier server. I have another Dovecot instance which returns: > NAMESPACE (("INBOX." ".")) NIL NIL The common part with Courier is that the namespace for INBOX folder (or basically user's namespace) is defined as "INBOX.", not as "". It might not be a problem, except camel_imapx_namespace_response_lookup_for_path() was specifically searching for an empty namespace prefix when it was asked for the INBOX path, which resulted in no namespace being picked and the "No IMAP namespace for folder path 'INBOX'" user visible error. I made a change with this to try, when searching for the INBOX's namespace, all the three variants, it is an empty string, the "INBOX" prefix and the "INBOX." prefix (note of the dot at the end of the third case, which is not used directly, but the actual folder separator for that namespace is used. It fixed the issue for me. I didn't change only that, though, I added a fallback to return at least the first known namespace, thus the function returns NULL only on errors. It might not be always the right namespace, but that will be safely discovered later, if reached at all. Created commit 57eb43b in eds master (3.13.7+) [1] Created commit c5c7e65 in eds evolution-data-server-3-12 (3.12.8+) [1] https://git.gnome.org/browse/evolution-data-server/commit/?id=57eb43b