incompatible folder names between mbox and imap based accounts - dragging folder structure from pop account to imap account fails (related to hierarchy delimiter)

UNCONFIRMED
Unassigned

Status

enhancement
UNCONFIRMED
10 years ago
Last year

People

(Reporter: harri, Unassigned, NeedInfo)

Tracking

1.9.1 Branch
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2b4) Gecko/20091210 Firefox/3.6b4
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091208 Thunderbird/3.0

imap (maildir) supports just a restricted set of characters for folder names. Thunderbird should rename folders appropriately, when moving/copying folders from an mbox based account to an imap account.

Reproducible: Always
How can an IMAP client(Tb) know the "restricted set of characters for folder names" at an IMAP server? Is there any RFC for it?
Component: Mail Window Front End → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: front-end → networking.imap
Version: unspecified → 1.9.1 Branch
sure, see http://tools.ietf.org/html/rfc3501#section-5, esp 5.1.3

The problem I had was: I tried to copy a folder "customer@some.famous.com" from my pop based account to an imap account (via drag-and-drop in Thunderbird, of course). The new mailbox in the imap account contained several hierarchy levels

customer@
    some
        famous
            com

All messages were put into the "com" mailbox; the higher levels were grayed out. 

Copying recursive mbox folders, e.g.

mailing list
    linux-kernel@vger.kernel.com
        old
    linux-wireless@vger.kernel.com
    netdev@vger.kernel.org

to an IMAP account failed badly. Only a part of all mails were copied, the rest was silently ignored. 

IMHO the folder names should have been kept on the copy operation. And all EMails should have been copied, of course.

I tried this with 2 IMAP servers included in Debian Squeeze: Courier and Dovecot. They behave pretty much the same for these operations, so I would assume its a problem with Thunderbird.
(In reply to comment #2)
> The problem I had was: I tried to copy a folder "customer@some.famous.com" from
> my pop based account to an imap account (via drag-and-drop in Thunderbird, of
> course). The new mailbox in the imap account contained several hierarchy levels
> customer@
>     some
>         famous
>             com

Tb probably requests "create customer@some.famous.com". 
Folder hierarchy delimeter seems "." at your server. Next, isn't it? 
> customer@some
>         famous
>             com

> All messages were put into the "com" mailbox; 

It looks that mails are copied to lowest level IMAP folder.

> the higher levels were grayed out.

If "create customer@some.famous.com" is issued, and if delimiter is "." at IMAP server, it's normal result. 

> IMHO the folder names should have been kept on the copy operation.

If your server use "." as delimiter, it's impossible to keep name, isn't it?
As you request, to keep folder hiearchy, different name from local mail folder is required.

> Only a part of all mails were copied, the rest was silently ignored. 

"Silent failure of copy/move by Drag&Drop between account" is known issue and many of them are already resolved. It seems that there are still some problems around Drag&Drop. Your case may be "interruption of Drag&Drop" issue.
Open separate bug with data such as IMAP log, please.
(one problem per bug is rule at B.M.O)

Any way, get IMAP log, and check IMAP level flow first.
> https://wiki.mozilla.org/MailNews:Logging
See RFC3501 for IMAP command/response, please.
(In reply to comment #2)
> sure, see http://tools.ietf.org/html/rfc3501#section-5, esp 5.1.3

What are you sure for, by RFC 3501 section-5?  
RFC 3501 section 5.1.3 is absolutely irrelevant to your problem, because Tb already supports modified-UTF-7 for 8bit characters in mail folder name well, unless your IMAP server doesn't properly support modified-UTF-7 for IMAP folder name referred by RFC 3501 section 5.1.3, and because your problem never relates to modified-UTF-7 for IMAP folder name, as far as I can understand your complaint/claim/request.
> 
> Tb probably requests "create customer@some.famous.com". 
> Folder hierarchy delimeter seems "." at your server. Next, isn't it? 

Thats the point. An ordinary user doesn't know anything about "hierarchy delimiters" and other chars with a special meaning defined on a remote server. Copying folders from one account to another I would expect that the folder names and hierarchy are kept. Surely I would not like to manually look through all subfolders for some chars that might be a folder delimiter.

Creating a folder "a/b/c" on a pop-based account doesn't give me 

        a
        +---b
            +---c

either, but a single folder named "a/b/c".
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
Harald, still see this problem?
Flags: needinfo?(harri)
Summary: incompatible folder names between mbox and imap (maildir) based accounts → incompatible folder names between mbox and imap based accounts - dragging folder structure from pop account to imap account fails (related to hierarchy delimiter)
You need to log in before you can comment on or make changes to this bug.