Bug 160208

Summary: IMAP Select response parsing bug
Product: [Frameworks and Libraries] kio Reporter: Ladar Levison <ladar>
Component: imapAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version: 3.5   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ladar Levison 2008-04-01 12:35:30 UTC
Version:           1.9.6 (using KDE 3.5.8)
Installed from:    Ubuntu Packages
OS:                Linux

Copy a message from one IMAP folder, to another. Then select the folder you just copied the message into. No messages show up. This only occurs if the response to the IMAP SELECT command looks like:

45 SELECT Inbox
* 172 EXISTS
* 0 RECENT
* OK [UNSEEN 3]
* OK [UIDVALIDITY 1]
* OK [UIDNEXT 29485]
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft \Recent)
* OK [PREMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)]
45 OK SELECT [READ-WRITE] Complete.

Basically Kmail needs to have the response look like:

45 SELECT Inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft \Recent)
* OK [PREMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)]
* 171 EXISTS
* 0 RECENT
* OK [UNSEEN 3]
* OK [UIDVALIDITY 1]
* OK [UIDNEXT 29486]
45 OK SELECT [READ-WRITE] Complete.

Note the first line. For whatever reason, Kmail is expecting the FLAGS line to come first. However if you consult RFC 3501, page 33, you will see that the FLAGS line doesn't need to be first. 

This bug came to light because the lavabit.com IMAP servers originally output the former response. They have since been patched to match the Cyrus code base, and the second response, but its still a bug that should be fixed.
Comment 1 Andrew Crouthamel 2018-11-02 04:28:52 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Andrew Crouthamel 2018-11-16 02:38:14 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version?

Thank you for helping us make KDE software even better for everyone!
Comment 3 Christophe Marin 2018-11-17 12:45:30 UTC
kio_imap4 doesn't exist anymore.