Closed Bug 417285 Opened 16 years ago Closed 15 years ago

Thunderbird inappropriately displays an alert when IMAP server returns a "NO" to list command

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b2

People

(Reporter: Saul.Tannenbaum, Assigned: Bienvenu)

Details

(Whiteboard: [has patch for review][no l10n impact])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b3) Gecko/2008020511 Firefox/3.0b3
Build Identifier: version 2.0.0.9 (20071031)

When an IMAP server responds as follows to a 'list " " "/home/%":

-1337884672[18212bc0]: 1ee7c00:domain.com:A:SendData: 6 list "" "/home/%"
-1337884672[18212bc0]: 1ee7c00:domain.com:A:CreateNewLineFromSocket: 6 NO LIST failed: wildcards not permitted in username
-1337884672[18212bc0]: 1ee7c00:domain.com:A:SendData: 7 list "" "/home/%/%"
-1337884672[18212bc0]: 1ee7c00:domain.com:A:CreateNewLineFromSocket: 7 NO LIST failed: wildcards not permitted in username
-1337884672[18212bc0]: 1ee7c00:domain.com:A:SendData: 8 list "" "INBOX"

Thunderbird inappropriately displays the message as an alert.

As this response is valid as per RFC 2342 section 5, no alert should be generated.

Reproducible: Always

Steps to Reproduce:
1.Login to IMAP server which does not permit wildcards in usernames when searching for shareable folders.
2.
3.
Actual Results:  
Thunderbird displays an alert, including the text provided by the server.

Expected Results:  
Nothing. Thunderbird should accept the response without an alert.

This behavior is seen when logging into a Version 5 or above Zimbra IMAP
server, and discussed on the Zimbra bugzilla, bug # 23617
The missing piece here is

   2 NAMESPACE
   * NAMESPACE (("" "/")) (("/home/" "/")) NIL
   2 OK NAMESPACE completed

RFC 2342 section 5:

   A client can construct a LIST command by appending a "%" to the Other
   Users' Namespace prefix to discover the Personal Namespaces of other
   users that are available to the currently authenticated user.

   In response to such a LIST command, a server SHOULD NOT return user
   names that have not granted access to their personal mailboxes to the
   user in question.

   A server MAY return a LIST response containing only the names of
   users that have explicitly granted access to the user in question.

   Alternatively, a server MAY return NO to such a LIST command,
   requiring that a user name be included with the Other Users'
   Namespace prefix before listing any other user's mailboxes.
Flags: blocking-thunderbird3.0a2?
Flags: blocking-thunderbird3.0a2? → blocking-thunderbird3?
I haven't seen evidence that this is a problem in the wild, so taking off blocking, but if I'm wrong someone will undoubtedly correct me.
Flags: wanted-thunderbird3+
Flags: blocking-thunderbird3?
Flags: blocking-thunderbird3-
Well, I consider myself out in the wild, and I've now experienced it with Thunderbird against two different servers:

- Zimbra, which caused the original bug to be filed
- Exchange, which, under circumstances I don't yet completely understand, returns a "NO [TRYCREATE]" which Thunderbird dutifully alerts about.

I don't know how prevalent the problem is, but having recently run across it against Exchange, I have to believe it isn't just me.
Yeah, we've been getting a steady stream of complaints from Thunderbird users.  We can tell them to disable NAMESPACE completely in the Zimbra server, but then they object because there's no way to access other users' mailboxes...
Sorry, I had missed the mention of Zimbra in comment #0.

I'll take it back on blocking-tb3.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: wanted-thunderbird3+
Flags: blocking-thunderbird3-
Flags: blocking-thunderbird3+
taking. I thought we didn't put up alerts from LIST commands, but apparently not. It might be helpful for me to have access to an account that does this...My account on our Zimbra server doesn't seem to have this problem. Or advice as to how to tweak the Zimbra settings to enable this problem...
Assignee: nobody → bienvenu
(In reply to comment #6)

I would venture that doing the opposite of what is described as a work-around In Zimbra bug 23617 comment #3 at
http://bugzilla.zimbra.com/show_bug.cgi?id=23617#c3
will show you the problem (obviously in Thunderbird you must have disabled 'Show only subscribed folders' under Edit, Account Settings, $accountname, Server Settings, Advanced)
I can duplicate this on my school's new Zimbra setup by unchecking "Show only subscribed folders" so let me know if you need any info or to have me test a patch.  I have debug builds of Thunderbird 2 and the trunk.
Since upgrading to Zimbra 5.0.11 (from a 4.5.x version), I now see this behaviour in Thunderbird (2.0.0.18) consistently.  If anybody working on this bug needs an account to test against, I'd be happy to provide one on my server.
Note: This problem still occurs on Thunderbird 3.0b1.
Attached patch proposed fixSplinter Review
this makes it so we don't put up alerts on no responses from LIST commands, which is a very reasonable thing to do (though I might add them to the activity manager once that lands).

This also fixes a crash with a null m_transport that I've been running into sporadically.

Thx to Scott Wunsch for the test case.
Attachment #359865 - Flags: superreview?(bugzilla)
Attachment #359865 - Flags: review?(bugzilla)
since we have a fix, putting in b2
OS: Mac OS X → All
Hardware: PowerPC → All
Target Milestone: --- → Thunderbird 3.0b2
Whiteboard: has patch for review
Whiteboard: has patch for review → [has patch for review][no l10n impact]
Component: General → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: general → networking.imap
Version: unspecified → Trunk
Attachment #359865 - Flags: superreview?(bugzilla)
Attachment #359865 - Flags: superreview+
Attachment #359865 - Flags: review?(bugzilla)
Attachment #359865 - Flags: review+
fix checked in.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
The mail server responded:LSUB (D11B)
The mail server responded:SELECT (D11B)

Accurs in TB 3.04 (MS Windows7 x64) in conjunction with a Cyrus v2.2.12 (with LMTPA) IMAP server 

Somehow this error also affects copying and might be related to https://bugzilla.mozilla.org/show_bug.cgi?id=555913
You need to log in before you can comment on or make changes to this bug.