[ 
https://issues.apache.org/jira/browse/NET-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15864208#comment-15864208
 ] 

Sebb edited comment on NET-601 at 2/14/17 9:46 AM:
---------------------------------------------------

Configured Thunderbird to maximum verbose level. (since it works).

Looking at the log I found that in some cases the transferred foldername used 
\\ as folder -  subfolder separator. In other cases Thunderbird transferred 
\\\\ as folder - subfolder separator. So rewriting folder-select routine seems 
to work:

{code}
if (!imapClient.select(fName)){
        fName = fName.replace("\\", "\\\\");
        imapClient.select(fName));
} 
{code}



was (Author: yggdrasild):
Configured Thunderbird to maximum verbose level. (since it works).

Looking at the log I found that in some cases the transferred foldername used 
\\ as folder -  subfolder separator. In other cases Thunderbird transferred 
\\\\ as folder - subfolder separator. So rewriting folder-select routine seems 
to work:

                        if (!imapClient.select(fName)){
                                fName = fName.replace("\\", "\\\\");
                                imapClient.select(fName));
                        } 


> IMAPClient.select cannot select mailbox in some cases with æøå, spaces and 
> sub-folders
> --------------------------------------------------------------------------------------
>
>                 Key: NET-601
>                 URL: https://issues.apache.org/jira/browse/NET-601
>             Project: Commons Net
>          Issue Type: Bug
>          Components: IMAP
>    Affects Versions: 3.5
>         Environment: eclipse on ubuntu workstation and ibm domino server on 
> ubuntu server. Connecting to IMAP on an IBM Domino server.
>            Reporter: Johnny Haugen Sørgård
>         Attachments: import_startssl_to_javahome.windows.zip, 
> testCommonsNetIMAPselect.java
>
>
> Partial response from LIST:
> {code}
> AAAB LIST  "" "*"
> * LIST (\HasNoChildren) "\\" "Backup log"
> * LIST (\Noinferiors \HasNoChildren) "\\" Inbox
> * LIST (\HasNoChildren) "\\" M&APg-ter
> * LIST (\HasChildren) "\\" Presis
> * LIST (\HasNoChildren) "\\" {24}
> Presis\Bod&APg- Industri
> * LIST (\HasNoChildren) "\\" {11}
> Presis\Done
> * LIST (\HasNoChildren) "\\" {15}
> Presis\id filer
> {code}
> Trying to select Presis\Bodø Industri fails like this
> AAAB SELECT "Presis\Bod&APg- Industri"
> AAAB NO SELECT failure, cannot select mailbox: Folder not found in IMAP name 
> space
> And trying to select Presis\id filer fails like this
> AAAB SELECT "Presis\id filer"
> AAAB NO SELECT failure, cannot select mailbox: Folder not found in IMAP name 
> space
> So far it seems like select fails when folder has more than one:
> * none US-ASCII
> * space
> * sub-folder separator



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to