If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Silent failure to delete read-only mailbox

RESOLVED FIXED

Status

Thunderbird
Mail Window Front End
RESOLVED FIXED
11 years ago
7 years ago

People

(Reporter: Josh Larios, Assigned: Bienvenu)

Tracking

Trunk
x86
Windows Vista

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)
Build Identifier: version 2.0.0.0 (20070326)

When trying to delete a read-only mailbox (or a currently-selected mailbox) from a UW-imapd mail server, TB acts as if the action succeeded, and removes the mailbox from the list. Despite the server returning a failure code, no warning is displayed, and it's only when the folder list is refreshed that the supposedly deleted mailbox shows up again.

This is reproducible using a UW-imapd server which identifies itself like so:

* OK [CAPABILITY IMAP4REV1 LITERAL+ SASL-IR LOGIN-REFERRALS STARTTLS LOGINDISABL
ED AUTH=GSSAPI] cg53.u.washington.edu IMAP4rev1 2006i.381 at Thu, 24 May 2007 16
:12:51 -0700 (PDT)

But testing against a UW-imapd server with version 2004.352 produces the same results.

Reproducible: Always

Steps to Reproduce:
1. Create a mailbox with permissions 0400 on a UW-imapd server.
2. Attempt to delete that mailbox.
3. No error dialog is displayed, mailbox is removed from view.
4. Refresh folder list. Mailbox reappears.


Expected Results:  
There should be an error dialog stating that the operation could not be completed.

TB debug log of the delete command failing:

236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:S-mail/deleteme:ProcessCurrentURL: entering
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:S-mail/deleteme:ProcessCurrentURL:imap://jdlarios@jdlarios.deskmail.washington.edu:143/delete%3E/deleteme:  = currentUrl
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:S-mail/deleteme:SendData: 8 list "" "mail/deleteme/*"
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:S-mail/deleteme:CreateNewLineFromSocket: 8 OK LIST completed
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:S-mail/deleteme:SendData: 9 close
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:S-mail/deleteme:CreateNewLineFromSocket: 9 OK Expunge ignored on readonly mailbox
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:A:SendData: 10 delete "mail/deleteme"
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:A:CreateNewLineFromSocket: 10 NO Can't open mailbox mail/deleteme: Permission denied
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:A:ProcessCurrentURL: entering
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:A:ProcessCurrentURL:imap://jdlarios@jdlarios.deskmail.washington.edu:143/discoverallboxes:  = currentUrl
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:A:SendData: 11 list "" "mail/%"
236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:A:CreateNewLineFromSocket: * LIST (\NoSelect) "/" mail/
...
(Reporter)

Comment 1

11 years ago
I get the same behavior from Tbird 1.5 (20051201) on Mac OS X, too.
Version: unspecified → 2.0
(Reporter)

Comment 2

11 years ago
Created attachment 266009 [details]
debug log

This is a more complete debug log from which the snippet in the report was taken.
(In reply to comment #0)
> 236[3c02ec0]: 33e4c18:jdlarios.deskmail.washington.edu:A:SendData: 10 delete
> "mail/deleteme"
> 236[3c02ec0]:
> 33e4c18:jdlarios.deskmail.washington.edu:A:CreateNewLineFromSocket: 10 NO Can't
> open mailbox mail/deleteme: Permission denied

Get NSPR log for ease of problem analysis by developer, please.
 (A) http://kb.mozillazine.org/Session_logging_for_mail/news
 (B) http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap
As seen in (A), internal status change is logged, although (A) doesn't describe status'es when IMAP.
"SET NSPR_LOG_MODULES=imap:5" is sufficient for initial analysis.
(Reporter)

Comment 4

11 years ago
(In reply to comment #3)

> Get NSPR log for ease of problem analysis by developer, please.
...
> "SET NSPR_LOG_MODULES=imap:5" is sufficient for initial analysis.

Er. Attachment in comment #2 was created with NSPR_LOG_MODULES=imap:5. But I've just created another one, with Thunderbird version 2.0.0.0 (20070326) / Mac OS X 10.4.9, and a different version of UW-imapd. I'll attach that next.
(Reporter)

Comment 5

11 years ago
Created attachment 266025 [details]
NSPR_LOG_MODULES=imap:5

Another imap:5 debug log showing the minimal steps to reproduce this behavior. Not shown in the log file: the lack of an error dialog when the server was unable to delete the "deleteme" mailbox. Shown in the log file: the "deleteme" mailbox present in a folder list immediately after the folder deletion ostensibly succeeded (according to the UI).
(Reporter)

Comment 6

11 years ago
The contents of the test account's mail folder, at the time of the creation of the attachment in comment #5:

eldorado:/home/test# ls -al mail
total 182716
drwx------  2 test  test       512 May 24 22:38 .
drwxr-xr-x  4 test  test       512 May 24 16:19 ..
-r--------  1 test  test      4057 May 24 16:19 deleteme
-rw-------  1 test  test   6455298 May 24 16:19 escobar
-rw-------  1 test  test  23058189 Jul  9  2006 nospamheader
-rw-------  1 test  test       510 Mar 20  2006 saved-messages
-rw-------  1 test  test       510 Jul  2  2006 sent-mail
-rw-------  1 test  test       510 Mar 20  2006 sent-mail-jun-2006
-rw-------  1 test  test   6931887 Mar 20  2006 sircam
-rw-------  1 test  test  11249826 Mar 20  2006 skeewiff
-rw-------  1 test  test  45695110 Jul  9  2006 spam-5plus
(Assignee)

Comment 7

11 years ago
Could I get access to the test account for testing purposes?
(Reporter)

Comment 8

11 years ago
Created attachment 266676 [details]
NSPR_LOG reproducing behavior with courier imapd

This debug log is an imap:5 log of the same problem, but with Dreamhost's courier imapd.
(Reporter)

Comment 9

11 years ago
(In reply to comment #7)

I've mailed you account information for the account used in creating the attachment in comment #8.


(Assignee)

Comment 10

11 years ago
OK, thx very much, Josh. The problem seems to be that we're not passing in a msg window to the imap code when we delete the folder, so it doesn't know how to put up the error message from the server. I'll investigate a bit more.
Assignee: mscott → bienvenu
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 11

11 years ago
Created attachment 266923 [details] [diff] [review]
proposed fix

pass in and propagate the msgWindow for the deleteFolder operation.
Attachment #266923 - Flags: superreview?(mscott)

Updated

11 years ago
Attachment #266923 - Flags: superreview?(mscott) → superreview+
(Assignee)

Comment 12

11 years ago
fixed on trunk.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Version: 2.0 → Trunk
You need to log in before you can comment on or make changes to this bug.