Closed Bug 79444 Opened 23 years ago Closed 23 years ago

Cyrus: can't empty trash folder or delete mail to trash

Categories

(MailNews Core :: Networking: IMAP, defect, P2)

x86
Windows 2000
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: bugzilla, Assigned: naving)

References

Details

(Keywords: imap-interop, Whiteboard: [nsbeta1+])

Attachments

(3 files)

With a Cyrus IMAP server v2.0.13, trying to empty trash brings up an alert
dialog saying: "The current command did not succeed. The mail server responded:
Mailbox does not exist." (you get this twice actually)

After this, you can also no longer delete messages at all (using the: "When I
delete a message, move it to the trash folder" setting), you get the same alert.
 Strangely, at first, before you try to empty the trash, deleting messages works
fine.

I can initially see the trash folder, in the outliner showing mail folders, and
it appears with a trash icon.  Sometimes I can look at the messages in the trash
folder.  But if I close and reopen the mail window, I see the folder, but get
the alert when trying to see what's in it.

Advanced IMAP Server Settings show

   Personal namespace: "INBOX."
   Public (shared):    ""
   Other Users:        "user."

 Allow server to overrde these namespaces is checked.

These are the settings that came up by default when I added the mail account
(did this fresh, wasn't a migration from Communicator)
QA Contact: esther → huang
I am wondering to know whether this bug is depend on bug 78237 to fix.....adding 
bug 78237 for this bug dependance, I am thinking without bug 78237 fix, then all 
the folder under inbox will cause problem (include trash folder...).Confirm bug 
to new.
Status: UNCONFIRMED → NEW
Depends on: 78237
Ever confirmed: true
Keywords: interop
Also, there were bug 27002 & bug 60810 logged for import special folder & trash 
folder UI problems.....Ccing David as well.
I did a little more poking around with tcpdump, and found that when selecting
folders in Communicator 4.77 (which works fine), the IMAP commands are:

DATA:   8 select "INBOX.FreeBSD".
DATA:   16 select "INBOX.Java Quake".
DATA:   19 select "INBOX.JOS".
DATA:   22 select "INBOX.Trash".

But when selecting the same folders in Mozilla, the commands are:

DATA:   10 select "INBOX.FreeBSD".
DATA:   14 select "INBOX.Java Quake".
DATA:   18 select "INBOX.JOS".
DATA:   22 select "INBOX/Trash".

So it's for some reason using a '/' instead of '.' separator, but just for the
trash folder.

Deleting a message in Mozilla traces out as:

> DATA:   10 uid copy 27 "INBOX/Trash".
< DATA:   10 NO Mailbox does not exist.

So it's using the wrong separator there too.
ahh thanks so much for digging into this. So we have a problem with our
hierarchy separator with regards to the trash folder.
Keywords: nsbeta1
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9.1
yes, Barry, that's very helpful. I don't know why the Trash would be treated
specially in terms of hierarchy delimiter, but that must be what's happening.
Priority: -- → P2
reassigning to self.
Assignee: mscott → naving
Attached patch proposed fix.Splinter Review
For cyrus all folders are subfolders of inbox so set the trash flag for 
the trash folder. Also the imapName is not the online name if hierarchyDelimiter
is different. Need review, david. 
with your fix, if I have a parent folder named Foo and a child folder of it
called Trash, won't we set the trash flag incorrectly on that sub-folder?
Attached patch revised patchSplinter Review
sr=bienvenu - keep a close eye out on any new bugs that appear for servers with
non-standard hieararchy delimiters after this is checked in - it's a very
delicate piece of code.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
fix checked in. 
Verified on 05-18-12-trunk build as following -- marking as verified.
(But, I am still seeing bug 78237 problem....)

302[598a840]: buggy.mcom.com:A:SendData: 2 select "Inbox.Trash"
.............

225[54aa310]: buggy.mcom.com:S-INBOX:SendData: 24 uid copy 27 "Inbox.Trash"
225[54aa310]: buggy.mcom.com:S-INBOX:CreateNewLineFromSocket: 24 OK Completed
225[54aa310]: buggy.mcom.com:S-INBOX:SendData: 25 uid store 27 +FLAGS (\Deleted)
225[54aa310]: buggy.mcom.com:S-INBOX:CreateNewLineFromSocket: * 20 FETCH (FLAGS 
(\Recent \Deleted \Seen) UID 27)
225[54aa310]: buggy.mcom.com:S-INBOX:CreateNewLineFromSocket: 25 OK Completed
Status: RESOLVED → VERIFIED
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: