Closed Bug 165253 Opened 23 years ago Closed 22 years ago

Courier-IMAP: Can't see IMAP folders the first time

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: michael, Assigned: Bienvenu)

References

Details

(Keywords: imap-interop)

Attachments

(1 file)

When I start up MailNews I see a list like this: my@email.com - Inbox - Drafts - Templates - Sent - Trash This is the cached list from last time, but when I click "Get Msgs" of if "Check for new mail at startup" is enabled the list becomes my@email.com - Inbox - Trash right after the check is done. If I reduce and expand the folder view all my folders are suddenly back. I'm using Courier-IMAP and have the following settings in Mozilla: IMAP server directory: INBOX. Personal namespace: Public namespace: "shared." Do not allow server to override these namespaces Here is the IMAP communication. The first time I check for mail (and the folders disappear) these commands are sent: * OK Courier-IMAP ready. Copyright 1998-2002 Double Precision, Inc. See COPYING for distribution information. 1 capability * CAPABILITY IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA 1 OK CAPABILITY completed 2 login "username" "password" 2 OK LOGIN Ok. 3 lsub "" "INBOX./*" 3 OK LSUB completed. 4 lsub "" "shared.*" 4 OK LSUB completed. 5 list "" "INBOX" * LIST (\Unmarked \HasChildren) "." "INBOX" 5 OK LIST completed. 6 list "" "INBOX.Trash" * LIST (\HasNoChildren) "." "INBOX.Trash" 6 OK LIST completed. 7 create "INBOX.Trash" 7 NO Cannot create this folder. 8 select "INBOX" ... When I reduce and expand the folder view these messages are sent: * OK Courier-IMAP ready. Copyright 1998-2002 Double Precision, Inc. See COPYING for distribution information. 1 login "username" "password" 1 OK LOGIN Ok. 2 lsub "" "INBOX.*" * LSUB (\HasNoChildren) "." "INBOX.Trash" * LSUB (\HasNoChildren) "." "INBOX.Templates" * LSUB (\HasNoChildren) "." "INBOX.Sent" * LSUB (\HasNoChildren) "." "INBOX.Drafts" 2 OK LSUB completed. 3 lsub "" "shared.*" 3 OK LSUB completed. 4 list "" "INBOX" * LIST (\Unmarked \HasChildren) "." "INBOX" 4 OK LIST completed. As you can see the difference is that when it goes wrong Mozilla sends the command: lsub "" "INBOX./*" instead of this command (which is sent the second time) lsub "" "INBOX.*" The last is the correct command since that is what I have set Mozilla up to use (and it works :) Why does Mozilla insist on placing the / at the end when I check for messages the first time even though it's not set under preferences? This was not an issue with Mozilla 1.0 (there you just had to edit prefs.js manually to get rid of the / at the end), but only with Mozilla 1.1 This happens with the Windows version too (tested under Windows 2000)
Keywords: interop
QA Contact: huang → meehansqa
Summary: Can't see IMAP folders the first time → Courier-IMAP: Can't see IMAP folders the first time
The same bug is present in Mozilla 1.2-alpha
I just submitted Bug# 172728 (I hadn't seen this one in my search). It appears to be the same bug. The change happened between builds 1.1 Alpha and 1.1 Beta.
*** Bug 172728 has been marked as a duplicate of this bug. ***
I can confirm this using build 2002111108. The fist lsub command in the log looks like this, 3240[2253920]: mail.haskin.int:A:SendData: 3 lsub "" "INBOX./*" and subsequent ones like this, 3244[226fcd0]: mail.haskin.int:A:SendData: 2 lsub "" "INBOX.*"
Status: UNCONFIRMED → NEW
Ever confirmed: true
This bug also causes Mozilla to delete all offline folders. I.e. Mozilla doesn't find any sub-folders the first time (due to bug) and removes all offline data!! After a second query (subfolders back again) a sync has to download all files again (in my case: several megabytes). Verified with Moz 1.2.1 and 1.3a on Linux.
Flags: blocking1.3b+
ahollosi@xmp.net, please don't set flags if you don't know how. thanks.
Flags: blocking1.3b+
This bug appears to be caused by the default delimiter for the namespace being set to '/' when the client is started. Once the client talks to the server it realizes the delimiter is '.' and so it stops appending the erroneous trailing slash. Setting the default value of the delimiter to kOnlineHierarchySeparatorUnknown fixes this bug, however I did some research and I think the code defaults to '/' bc all the docs for IMAP suggest strongly that you use a delimiter and I bet some people were not setting one correctly and it was causing problems elsewhere. Just changing this might not be the best way to go since it may cause servers to do worse things if the user sets their inbox value incorrectly. It seems to me the real way to handle this is to query the server and if the delimiter is different then the default then requery with the correct delimiter before deleting the folders. I will look into this approach.
sets default delimiter to kOnlineHierarchySeparatorUnknown rather than '/'
Another approach I tried was to move the LIST command on the INBOX to before the LSUB command. This solves the problem since during the LIST command the hierarchy delimiter gets properly set to '.' and so the LSUB succeeds the first time. Is there any reason we can't do a LIST before the LSUB? It appears that the only time we get the delimiter is in response to the LIST... too bad we don't get it in response to the LSUB.
I've this problem solve by have unclick the show only subscribe folder. But now a greater problem came. Mozilla No longer know what folder is Sent, Template, Draft and etc (System folder) This is actually cause some drawback. The way to resolve this is to set manually the cooresponding folder to each of them, luckily I only have 5 user. and that is not going to be good If I've 50 Users... Please solve this as it is on the same line :) Thank in Advance
pretty please with sugar on top.... fix this behaviour! i've just tried the latest RC for 1.4: build 2003052908 and the bug still persists, although the reports date way back! I BEG you guys! It has taken two years to get rid of the first major Courier- IMAP problem (see 80858) and now we're stuck with this #$%^%^! Please, please don't make us go through this again. Go by the rfc-book and fix this (if possible for 1.4) once and for all! [Don't underestimate these kind of tiny UI-issues. Their annoyance-level can really boost one's adrenaline]
this won't be in 1.4 - I'll try to get to it as soon as I can for 1.5 but I have other Cyrus issues to deal with first. I'm sorry but I only have a very small amount of time to deal with IMAP issues. Does your Cyrus server support personal namespaces, so that you can get rid of the online server directory? Your folders will show up as sub-folders of the INBOX, but I believe we show the folders correctly.
taking to investigate.
Assignee: mscott → bienvenu
this bug was not present in 1.0.0 1.0.1 1.0.2 (at least the debian versions - i do not know if debian added some patches)
can anyone reproduce this with a 1.5 trunk build from today? I can't reproduce this.
Setting the IMAP server directory seems to work now. It didn't work in my debug build from 20030721.
Yes, I made some fixes to the handling of the imap server directory. Yes, we'd like to get rid of it, but it was easier to make it work.
Just tried the 2003/08/07 nightly, and the problem appears to be solved. Thanks.
marking fixed
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: