Closed Bug 497627 Opened 15 years ago Closed 15 years ago

IMAP connection connects, but times out when connecting to a Dovecot server

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: dlynes, Unassigned)

Details

(Keywords: imap-interop, qawanted, Whiteboard: closeme 2009-10-05)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
Build Identifier: version 2.0.0.21 (20090302) and Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090611 Shredder/3.0b3pre

- SSL IMAP connections to Gmail are working fine
- SSL IMAP connections to Dovecot connect (usually, but not always), and then time out
- when SSL IMAP connections to Dovecot do not connect, they still time out; don't get any refused connections
- Avira antivirus is completely disabled
- Windows firewall is turned off
- no other personal firewalls installed, and no other virus scanners installed

Reproducible: Always

Steps to Reproduce:
1.  Has only been happening today (June 11, 2009) and maybe yesterday (but we didn't use email yesterday).  Up until today, we were experiencing periods where timeouts were occurring, but a simple restart of Thunderbird would fix the issue, temporarily.
2.  Five hotfixes were applied yesterday (June 10, 2009) morning:
<ul>
<li>June 10, 2009 @ 12:59:18AM<br />KB961501</li>
<li>June 10, 2009 @ 12:59:11AM<br />KB969898</li>
<li>June 10, 2009 @ 12:57:04AM<br />KB970238</li>
<li>June 10, 2009 @ 12:56:55AM<br />KB969897-IE7</li>
<li>June 10, 2009 @ 12:56:18AM<br />KB968537</li>
<li>June 10, 2009 @ 12:59:39AM rebooted to apply hotfixes</li>
</ul>
3.  Version of Dovecot connecting to is:  1.0.15, running on Debian Lenny
Actual Results:  
After having shutdown Thunderbird, or Shredder, and doing a 'netstat -an | more', I find that I still have numerous connections to the server that are still connected.  However, if I bring up task manager, and sort by 'image name' in the process list, I see no entries for Thunderbird.
When I tried a 'netstat -anb', or 'netstat -anb | more', I get the first item, which is an smb connection back, immediately, but the next entry which is the IMAP SSL connection to the dovecot server never seems to display.  After about 5 or 6 minutes, I gave up on waiting for it to return, assuming it might never return, and hit Ctrl-C.
After hitting Ctrl-C, I did a 'netstat -an | more' again, and sure enough all the connections to the imap server were still showing in a 'ESTABLISHED' state.

Expected Results:  
I expected the client to connect to the imap server, check on number of messages, including new messages, and return almost immediately.

Screen capture of a search for 'connect' in the config editor is also included at http://westwoodvillagecomputers.com/mozilla/Shredder-connect-configeditor.png
So this is actually SSL not TLS? If that so having any problems with TLS?
Version: unspecified → Trunk
In Shredder, it's selected as SSL/TLS.
In Thunderbird, it's selected as SSL.
Keywords: imap-interop
Just enabled SSL on mine Dovecot 1.0.15 server running also on Debian lenny, no problem so far.
Tested using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090611 Shredder/3.0b3pre
Could you provide your IMAP log according instructions over here https://wiki.mozilla.org/MailNews:Logging
Nikolay, which log level would you like, for the log?

Thank you.
Debug level - 4
Having it happen on Linux now as well, for 8 or more accounts.  The first seven
accounts that connect have no issues, everything else times out.
Just waiting for the Windows machine to become available before I can log the connections with the debug level set.  In the meantime, I will try logging what I've got on the Linux box.

When I realized that it was happening on Linux for 8 or more accounts, I bumped up the memory limit and process limits for logins on Dovecot.  That seems to have solved the issue for that, on Linux.  However, the same problem still exists on Windows.  I now have access to that box, so I am generating the log for it.
0x804B0014 is NS_ERROR_NET_RESET, which means the server reset the connection after it initially connected - maybe something bad is going on at the ssl level? An imap protocol log won't tell us anything about that, unfortunately. I think there is some ssl logging you can turn on...
I think it will not hurt to try use STARTTLS and see if this apply too. Also have check your dovecot log, usually it log any problems very well.
I've found what seems to be a breakthrough.

If I delete the account in Thunderbird, and then recreate it in Shredder, and then change it to an SSL/TLS account, it seems to work.

However, if I delete the account in Thunderbird and recreate it in Thunderbird, and then change it to an SSL account, it doesn't work; I still keep getting the same timeout issues.

I've also tried the TLS option in Thunderbird, and it keeps prompting me for a password, and doesn't accept the password.
This will cause migration issues from 2 -> 3. Requesting blocking.
Flags: blocking-thunderbird3?
Keywords: qawanted
are we trying to do a non-secure connection on the ssl port? Is this some of the isSecure bustage that's been going on? Do you still have the original Thunderbird profile/prefs?
No, I was not trying to do a non-secure connection on the SSL port.  I was trying to do TLS on the regular port 143 (however, I remapped it to 60143, so it doesn't show up on port scans...I don't normally have 143 listening on an externally reachable address).

When I'm using Secure IMAP (SSL), it's through port 993.

Also, regarding my previous observation about the migration of an account from Thunderbird to Shredder...it worked right after I did that, but then my wife got back on the machine, and it stopped working.  Maybe there needs to be special code in there to detect who's at the keyboard?
I meant was Thunderbird trying to do a non-SSL connection to port 993, not were you...but if it's intermittent, it sure sounds like a problem on the server.
I have no idea if it is, or not.

What I have noticed is that one specific account seems to be having issues regardless of whether it's on Linux or Windows for the client.

I'm going to try deleting the Dovecot index files to see if that fixes the problem.
this sounds like the server mis-behaving, so I'm going to mark not blocking...did deleting the dovecot index files help?
Flags: blocking-thunderbird3? → blocking-thunderbird3-
(from comment #18) Daniel, did deleting the dovecot index files help?
Whiteboard: closeme 2009-10-05
RESO INCO due to lack of response to last question. If you feel this change was in error, please respond to this bug with your reasons why.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: