Closed Bug 250657 Opened 20 years ago Closed 20 years ago

Hangs (times out) at 100% when "Copying message to Sent folder" using IMAP and SSL, but the message is successfully copied to the sent folder.

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 206408

People

(Reporter: ben, Assigned: mscott)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1
Build Identifier: Mozilla Thunderbird version 0.7.1 (20040626)

When sending a message, often (but not every time), the process will hang at
100% when it is copying the message to the sent folder. The dialog box on the
screen has the title "Sending Messages", and it says:

Status: Copying message to Sent folder...
Progress: 100%

The message sends without problem, and the progress bar for the copying process
goes from 0% to 100% usually quite quickly, but then it hangs.
If you click "Cancel" while the "Sending Messages" dialog is displayed, you are
returned to the message composition window. The message shows no signs that it
has been sent, and when you close it, it prompts you to save the message in the
Drafts folder as though it has not been sent.

If you don't hit cancel to the "Sending Messages" dialog, and instead wait for
at least 10 minutes (after 10 minutes I left and came back 15 minutes later), a
prompt is displayed with the title "Confirm", and it says:

There was an error copying the message to the Sent folder. Retry?

It is important to note however that the message *is* sent properly, and it *is*
copied to the Sent folder (even though it says that an error occurred).

Clicking "No" to the error message returns to the message composition window
just like clicking "Cancel" earlier.
Clicking "Yes" fails in the same way, and it appears to try and copy the message
to the sent folder a second time, however, the message is not duplicated in the
sent folder.

Reproducible: Sometimes
Steps to Reproduce:
1. Compose message
2. Send the message, with the option to copy to the Sent folder enabled.
Actual Results:  
A dialog indicating that the message is being sent is displayed briefly,
followed by another dialog which is too quick to read, followed by the dialog
stating that the message is being copied to the Sent folder. This window this
dialog sits at 100% for more than 10 minutes, or until you click "Cancel". The
message is still sent and it *is* copied to the sent folder.

Expected Results:  
After reaching 100% of copying to the Sent folder, the window should be
disappearing. This should not cause the "Sent" folder to stop responding, and
should not require restarting Thunderbird.

- This seems to occur more often for larger messages (almost every time I send a
message with an attachment).

- Once it has happened, subsequent attempts to copy anything to the sent folder
fail (including sending messages or dragging messages directly to the sent folder).

- Unlike the first attempt, if you try to send another message after one has
failed, it is successfully sent but it is *not* copied into the sent folder.
This results in the loss of the sent message, unless you save it to another
folder (such as the Drafts folder), as even separately saving the message to the
"Sent" folder fails.

- In addition, subsequent attempts to access the sent folder fail (the
hour-glass icon appears on the cursor, and the folder never refreshes). This
does not prevent you from using Thunderbird. If you click on another folder (on
the same server - such as the "Inbox" - or another server) it properly loads,
and everything works unless you try and load the "Sent" folder again.

- The only resolution I have found is to close Thunderbird and open it again.
Once this is done, you can open the Sent folder and see your message, and you
can send messages properly until the problem occurs again.

- I have two accounts on two different IMAP servers. One is my personal server
(either Bincimap or Courier-IMAP), and the other is run by Boston University.
This *never* happens with my personal IMAP server, it *only* happens with BU's
IMAP server. I use my personal server more often (and send larger files more
often), so I am certain it is only a problem with specific mail servers.

- I generally use SSL for all my IMAP connections (both servers). I was unable
to cause the problem after briefly trying without SSL: I tried sending a large
message with SSL and the problem occurred. I tried a couple times with the same
message without SSL and the problem did *not* occur. I tried once more with SSL
and the problem occured. So, the problem is most likely related to SSL.

Unfortunately, I don't know much about BU's IMAP server. All I know is the tag
line that is displayed at the beginning of a connection (when I telnet to port 143):

* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS XXXXXXXX AUTH=LOGIN] acs-imap.bu.edu
IMAP4rev1 2001.315 at Fri, 9 Jul 2004 13:17:03 -0400 (EDT)

I think the server it is running on is running AIX, but I am not sure.
I have basically the same problem in linux using version 0.7.1 (20040626).  The
problem occurs _only_ when using an SSL imap connection.  When sending a message
my progress bar doesn't go to 100%, it stays at 0% and hangs at the "Saving
message to INBOX.Sent folder..." message.  That difference might just be
platform specific.  

Another difference I have is that after this save fails, I still can access the
sent folder (at least for reading).  

I'm pretty sure that my thunderbird starts failing after being open for a
certain amount of time.  I almost always notice the problem in the morning when
thunderbird has been open all night.  
(In reply to comment #1)
> I have basically the same problem in linux using version 0.7.1 (20040626).  The
> problem occurs _only_ when using an SSL imap connection.  When sending a message
> my progress bar doesn't go to 100%, it stays at 0% and hangs at the "Saving
> message to INBOX.Sent folder..." message.  That difference might just be
> platform specific.  
> 
> Another difference I have is that after this save fails, I still can access the
> sent folder (at least for reading).  
> 
> I'm pretty sure that my thunderbird starts failing after being open for a
> certain amount of time.  I almost always notice the problem in the morning when
> thunderbird has been open all night.

This may be related (simply because it is another SSL problem), but the key
issues regarding my problem is that although the message *is* properly saved to
the "Sent" folder, the connection seems to hang after that point, and I am
unable to view the "Sent" folder, or save anything to the "Sent" folder
afterwards. I don't know much about the IMAP protocol, and I don't have any
network log files because the whole process is encrypted.

My guess is that it has to do with the process of refreshing the folder listing
after adding a message, and some oddity with the way that this particular server
replies. However, it seems odd to me that the problem only seems to present
itself over SSL.
OK, this is happening to me with SSL IMAP, against the MIT server. For months 
and months, I was just bccing myself and using an inbox rule to move things to 
the sent folder, but this has a few problems:
(1) I don't see who else I bcc'ed
(2) I don't have immediate access to my sent messages, a problem as I frequently 
send out slightly different emails to different people (thank you notes, party 
invitations, what have you) and I'd like to open-as-new, edit and send
(3) I can't send myself notes and have them stay in my inbox.
So, you know, I'd like it fixed. I can go back, I guess, to my workaround, and 
I've started using MS Outlook at work, but it would be swell if you could get 
this to work.
Seeing this on OS X, too. Perhaps a dupe of bug 206408?
OS: Windows 2000 → All
Hardware: PC → All
(In reply to comment #5)
> Seeing this on OS X, too. Perhaps a dupe of bug 206408?

I would agree that this bug is described among the comments in <a
href="http://bugzilla.mozilla.org/show_bug.cgi?id=206408">bug 206408</a>,
expecially the comments regarding the MIT or cyrus IMAP server. However, this
bug is so hard to describe, that I believe bug 206408 describes at least a
couple different bugs which may just appear similar. I've got to check what mail
server BU uses, and see if it is cyrus. I doubt I can get them to update, but
who knows.
I am having this problem with an ssl courier-imap server.  Oddly it started
happening after my mail server switched ip addresses, which may be a coincidence.

It may not have anything to do with the type of imap server, since if I run a
packet sniffer while attempting to send a message, there is no traffic (except
for smtp) for several minutes until the message is finally copied to my sent
folder.  Also interesting, is that when it finally copies, it opens a new IMAP
connection (new three way handshake and all that).

I think it may be triggered by having too many connections open on the mail
server, and it has to wait for one to time out (then making a new connection and
finishing the operation).

Other times, the message is copied right away, but the Copying message remains
for  several minutes.  I have less information about this case as it is not as
reproducable.

This is happening with 0.9 (20041103) on windows xp sp2.

It appears as though there was a similar bug in mozilla where the copy operation
was not being cleaned up.
(In reply to comment #7)
> I am having this problem with an ssl courier-imap server.  Oddly it started
> happening after my mail server switched ip addresses, which may be a coincidence.
> 
[ snip ]

My problem is not a thunderbird bug, but a buggy dsl modem that was doing some
kind of connection tracking/stateful inspection and dropping connections older
than 10 minutes.
I have also this problem.

But it is with a normal smtp connexion (no ssl) and after I have compacted the 
folders with Thunderbird (during the last session).

Furthermore, when I close Thunderbird 0.9 and reopen it, if I go to the sent 
mails folder, it is said that there is an index reconstruction of the letter 
<< E >>.

I do not know whether it could be of help, but I wanted to add those facts.
I experience this connecting to an exchange 5.5 SP3 server over IMAP, not using
SSL, with thunderbird 1.0rc on fedora core 3 (built from sources). Same problem
on official FC3 RPMS for 0.8, 0.9-1 and 0.9-2
I should add the following:
- it always does send, and copies it to sent successfully
- the first one hangs at 100%, the next (if there is still something open) keeps
trying to send in the dialog (though is as successful as the first)
- it causes the first mail I receive afterwards to be unopenable (it always
appears blank)
- several people have complained of the same problem at mozillazine:
http://forums.mozillazine.org/viewtopic.php?t=63477
- if I leave the window open, it eventually sends (possibly related to next)
- if I can convince tb to check the sent folder on IMAP, that seems to fix it
and the windows close.


*** This bug has been marked as a duplicate of 206408 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.