Bug 88690

Summary: IMAP folder hierarchy displayed incorrectly when server is DBMail
Product: [Unmaintained] kmail Reporter: Steve Purcell <kdebugs>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: pcap-format Ethereal dump of comms

Description Steve Purcell 2004-09-02 16:12:58 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Debian testing/unstable Packages

Given an IMAP folder hierarchy in DBMail containing a folder such as "INBOX/personal/friends", the tree view in KMail displays the following folders:

  inbox
      personal
          friends
      friends
  personal
      friends
  friends

whereas the *same* hierarchy in a Courier IMAP server is shown correctly as:

  inbox
  personal
      friends

To find the known folders, KMail issues the command 'LIST "" "INBOX/%"' to the IMAP server, to which DBmail apparently responds correctly, according to the IMAP RFC. Mozilla Thunderbird displays the folder hierarchy correctly. My guess is that there is an error KMail's construction of the folder tree based on the IMAP server's LIST response, possibly when the server's folder path separator char is '/'. (For Courier, it is '.')

The DBMail version used was 2.0, with the MySQL back-end.

Please do not hesitate to contact me if you need more information.
Comment 1 Carsten Burghardt 2004-09-02 22:29:23 UTC
Please capture the traffic between your box and the server with ethereal when 
kmail is starting up and listing the folders, remove your password and 
attached it to this report. This works only if the connection is not 
encrypted.

Comment 2 Steve Purcell 2004-09-03 11:33:45 UTC
Created attachment 7399 [details]
pcap-format Ethereal dump of comms

This dump contains KMail's start-up conversations with both the DBMail server
and the Courier server. Both servers have the same folder structure, so the
responses from each can be compared in order to understand why the KMail folder
tree is built incorrectly for DBMail.
Comment 3 Carsten Burghardt 2004-09-04 17:32:40 UTC
Any chance to get a test account for this server?

Comment 4 Steve Purcell 2004-09-04 20:34:37 UTC
Yes. Here are the details:

Server: pythonconsulting.com
Port: 1143
User: kmail
Password: kmail

Please let me know when this account is no longer needed. It does not receive mail, but you can try creating folders/subfolders etc. I have created one subfolder of 'inbox' called 'level_1', and one subfolder of 'level_1' called 'level_2'.
Comment 5 Carsten Burghardt 2004-09-05 16:39:26 UTC
I checked the server and in this case you have to blame the server. Kmail requests the mailboxes of the first hierarchy with
list "" "%"
The server replies with _all_ mailboxes - even with those that are located under INBOX:
* list () "/" "INBOX"
* list () "/" "INBOX/level_1"
* list () "/" "INBOX/level_1/level_2"

This clearly violates the rfc2060 standard:
The character "%" is similar to "*", but it does not match a hierarchy delimiter.  If the "%" wildcard is the last character of a mailbox name argument, matching levels of hierarchy are also returned.

Your courier server responds correctly.
Comment 6 Steve Purcell 2004-09-05 18:05:06 UTC
Okay, thanks Carsten. I will contact the DBMail developers and raise a bug with them.