Closed Bug 787882 Opened 12 years ago Closed 8 years ago

IMAP draft messages not deleted

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: andrixnet, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [dupme])

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/15.0
Build ID: 20120824154833

Steps to reproduce:

I have several IMAP accounts, some on a Linux server, also yahoo and gmail. 



Actual results:

Since TB 13, also verified in TB 14 and 15, when I compose a message and writing that message takes longer and message gets autosaved to Drafts folder at least once (no manual save), after I send the message, the message remains in the Drafts folder. Sometimes even several versions (if the compose window remains open long enough). 

The difficult thing is the fact that this does not happen always, only sometimes. Other times it works as expected, ie message autosaved in Drafts gets deleted upon send. 
I have not been able to establish a clear correlation with something for this issue to appear. Now I have to regularly check Drafts folder for remains ...

Sometimes I do have network timeouts after sending message, but at saving to Sent folder stage. The error is temporary, a retry gets the jobs finished. However, this issue happened for messages that did not exhibit this problem as well.

I have verified this on the same accounts, but from 2 different TB installations (2 computers).  


Expected results:

Message once sent and autosaved to Drafts should be removed from Drafts folder.
Following is known issue.
- Auto-save is invoked even after Send(Send Later) is requested.
- While auto-save is in progress, Send(Send Later,Save As Draft) is invoked
  at same time when requested by user.
This produces contention of Drafts folder/old draft mail(will be deleted) between Auto-save and Send(Send Later,Save As Draft). And, in such case, "deletion of old draft mail by Auto-save and/or Send(Send Later,Save As Draft)" may fail.
Bug 638390 is a intentionally reproduced case with IMAP Drafts folder, with contention of old draft between Auto-save and manual draft save.
Because your case is IMAP case and your problem happens only sometimes, phenomenon of Bug 638390 is suspected.

Do you see your problem with local Drafts folder?
Do you see your problem with auto-save disabled(manual draft save always)?
Whiteboard: [dupme]
Summary: Drafts messages not deleted → IMAP draft messages not deleted
Blocks: tb-drafts
I still experience this on TB-17.0.7

No manual save is involved in my experience.
It is always "Send", not "Send later"
Drafts folder is IMAP (always). 
I've never used the local Drafts folder. 

I will try the manual save scenario. Testcase between aug 1st and 10th. Thank you for understanding. 

P.S. 
Since there is a race condition between send and auto-save, a queue should be created to take these operations and execute them in sequence.
Also, message in composition window should be assigned a unique ID so that changing the subject as described here https://bugzilla.mozilla.org/show_bug.cgi?id=638390 should apply to same message, just a newer version, and with scheduling in a queue, the problem should be theoretically solved.
I'm not sure bug 638390  is related.

When you return, please try the current beta from http://www.mozilla.org/thunderbird/channel/
Flags: needinfo?(andrixnet)
I have tried these scenarios: 
- IMAP account under my control, but not on local network. Drafts on IMAP folders. 

1) autosave @ 1m; compose message, allow for autosave to execute.
Drafts contains one message.
Send mail.
Drafts contains one message. 
Delete message from Drafts.
2) autosave disabled; compose message, save (manually)
Drafts contains one messages. 
Send mail.
Drafts contains one message.
Delete message from Drafts. 


- IMAP account under my control, but not on local network. Drafts on local folders. 
1) autosave @ 1m; compose message, allow for autosave to execute, then send mail.
2) autosave disabled; compose message, save (manually), then send mail.

Under this case, both tests leave nothing in Drafts. 

TB-17.0.7
Flags: needinfo?(andrixnet)
WFM per comment 5.
please reopen if I misunderstood, and you still see this problem
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Component: General → Networking: IMAP
Product: Thunderbird → MailNews Core
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.