[Bug 240350] New: KMail imap connection freezes in response to broken response

Andreas Aardal Hanssen andreas at hanssen.name
Tue Jun 1 13:24:39 BST 2010


https://bugs.kde.org/show_bug.cgi?id=240350

           Summary: KMail imap connection freezes in response to broken
                    response
           Product: kmail
           Version: 1.13.2
          Platform: openSUSE RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: IMAP
        AssignedTo: kdepim-bugs at kde.org
        ReportedBy: andreas at hanssen.name


Created an attachment (id=47556)
 --> (http://bugs.kde.org/attachment.cgi?id=47556)
Wireshark protocol dump showing this error in action.

Version:           1.13.2 (using KDE 4.4.2) 
OS:                Linux

Microsoft Exchange's IMAP interface can sometimes, consistently, produce broken
IMAP response when the Exchange server backend is unavailable. This causes
KMail to fail to update anything that requires IMAP roundtrips. The connection
just hangs - and the situation is unrecoverable. You must shut down kmail, and
then kill all kio IMAP connections to allow recovery. It happens with Exchange
2010 and one earlier version too, so it's likely to be a problem that's not
getting fixed.

The protocol error is:

"<tag> NO Server unavailable. 15\r\n"

The tag is normally the tag for the last submitted IMAP command. But sometimes,
as with IDLE, Exchange mistakes the IDLE command for a tag, and responds like
this:

"DONE NO Server unavailable. 15\r\n"

This is clearly a broken response to the DONE command as part of an IDLE
session, but the problem is more severe: Exchange can suddenly send the NO
response to any command, including commands for which NO is not a defined
response, such as NOOP.

KMail chokes on this input and just hangs. Thunderbird gets confused and thinks
it's in unauthenticated mode sometimes, so it pops up the password dialog ;-).

For reference, Thunderbird generally pops up a dialog box reporting the
protocol violation (which is quite annoying, but the client reconnects and
recovers perfectly after that). KMail doesn't pop up anything, it just gives
you the silent treatment ;-).

Reproducible: Always

Steps to Reproduce:
The requirement is that you have an Exchange server that enables IMAP, and
which is heavily loaded so that it becomes unavailable from time to time. Then
just connect to it with KMail's IMAP and wait. Eventually the error will show
up.

Actual Results:  
KMail application is responsive, but the IMAP error is unrecoverable. Emails
don't show up when you click them, and when you select a folder, KMail tells
you it's opening the folder. In reality it's just doing nothing.

Expected Results:  
An error dialog and dropped connection, allowing recovery.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list