Closed Bug 436944 Opened 16 years ago Closed 15 years ago

Undo delete message no longer working on IMAP

Categories

(Thunderbird :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 417167

People

(Reporter: mozilla, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
Build Identifier: version 2.0.0.14 (20080421)

--  this isn't using 'Gmail', so isn't related to 'Bug 417167' which comments point toward Gmail's implementation as being the problem.

Sometimes I accidentally delete the wrong message (quick click, & del, oops wrong
message was selected).  Try to Undo -- undo no longer undoes (this used to work).
The delete of the message places the message into the Trash folder, however, Undo no longer moves it (or a copy of it) back.  Previous behavior was that Undo would restore a copy of the deleted message into the target folder (the copy that originally had been moved to Trash was still in trash -- quirky, but fine).

Now to 'undelete', I have to go search through Trash -- assuming it's a delete that I notice before I exit T-bird, since my Trash gets empty when I leave (exit) T-bird. 



Reproducible: Always

Steps to Reproduce:
1.  Delete is set to move to Trash...using IMAP (IMAPS to be exact)
2.  Delete message (it gets moved to Trash)
3.  Try undelete (either on keyboard or off of GUI menu)
Actual Results:  
 Msg does not get restored to folder it was deleted from, stays in Trash.

Expected Results:  
 Msg restored to location prior to delete operation.
 (Condition of msg in Trash folder: indeterminate)
Get IMAP protocol log, and check protocol level flow first, to see whether IMAP networking related problem or not. If Tb's protocol level flaw is seen or funny behavior of Tb is seen in log, attach log file to this bug, please. See RFC 3501 ( http://www.faqs.org/rfcs/rfc3501.html ) for IMAP command & response.

It can be UI related problem.
Was any error message issued in Error Console when you did "Delete & Undo delete"? 
1) You cannot read IMAP command and responses with secure IMAP -- its designed that way...unless there is some other protocol log in T-bird you are referring to?  I don't believe I'm familiar with that.  Where is it?  

2) Why would this become an IMAP problem?  It used to work -- and has broken
sometime within the past few releases (don't know exactly when -- it's not
a feature I use frequently).  But the message is properly moved to the Trash IMAP folder, when I delete, so why can't it move it back?  Has Mozilla changed how it "undoes" a delete under 'IMAP' recently?  How would it undo a delete under a POP account?  Wouldn't it just move the "file" from one folder to the other?

3) No error message in console.  Neither is there any error message when I
manually move it from Trash back into whatever folder it has initially been
moved from.  

4) It's been a while since I read the IMAP protocol, but I don't remember a
selective message 'undelete'.  Once you did a commit, I thought it was 'committed'.  I always thought "undo" was a mail-client function that copied the message back from the Trash.  (and if you said to delete 'permanently' and not 
use 'Trash', then you could not expect undo to work).   Has Tbird changed in this area? 
(In reply to comment #2)
> 1) You cannot read IMAP command and responses with secure IMAP -- its designed that way.

What do you mean by IMAPS or "secure IMAP"? TLS(means use StartTLS, confusing though) or SSL is chosen at "Server Setting"/"Security Settings" of IMAP account definition of Tb?
If yes, don't worry about it. Attached log to Bug 417167 is for Gmail IMAP, and Gmai IMAP requests SSL/port 993 in Tb'd definition. Please note that NSPR logging of Firefox/Thunderbird is application level logging, not TCP or IP level logging with sniffing by external program.
Same comment as Bug 417167 Comment #1:See Bug 402793 Comment #1 for getting log.

If no, let me know about IMAPS or "secure IMAP", please.

> 2) Why would this become an IMAP problem?

I meant "Tb's problem relates to IMAP/Networking/SSL or TLS" of recent Tb's releases, for example, Tb's fault in server response handling.

> 4)
> I always thought "undo" was a mail-client function that copied the message back from the Trash.

It's not true.
When "Move to Trash model" and Trash is also IMAP folder at same IMAP server, Tb issues "COPY" to Trash then "STATUS flag \Deleted", and when "Undo Delete", issues "STATUS flag -\Deleted"(original mail) and "STATUS flag \Deleted"(copy in Trash). This is very different from "Move/Copy back to original folder from Trash folder". And, because of this mechanism, "Undo Delete" is possible just after delete only and is not selectable currently(to avoid too complicated implementation). See attached log to Bug 417167(Gmail IMAP case).
(In reply to comment #2)
> 1) You cannot read IMAP command and responses with secure IMAP -- its designed
> that way...unless there is some other protocol log in T-bird you are referring
> to?  I don't believe I'm familiar with that.  Where is it?  

Information about logging protocols within Thunderbird can be found here:

http://wiki.mozilla.org/MailNews:Logging
The undo operation simply resets the \Deleted flag, so if the original folder has been EXPUNGED, the undo will fail. 
This can happen if:
* You compact the folder
* The message list was refreshed and there were more than twenty deleted messages
* The 'mail.imap.expunge_after_delete' preference was set to true.
This bug appears to be a Gmail specific bug, as I've tested it with other IMAP accounts with no problem. I also reported it previously here: https://bugzilla.redhat.com/show_bug.cgi?id=485520
Reporter if you follow http://mail.google.com/support/bin/answer.py?answer=78892 spcially the tb things does the issue go away ?
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.