Hi,
  lets try this again.

I'm having problems with folders containg the '&' character (which is causing our Webmail users some grief).

I crated two files named 'b &- d' and 'C & D' and then did a:

      Folder root = store.getDefaultFolder().getFolder("mail/amp");
      Folder[] folders = root.list("%");
      for (int i = 0; i < folders.length; i++) {
        try {
          System.err.println(folders[i].getFullName());
          if (!folders[i].exists()) {
            System.err.println(" (doesn't exist?)");
          }
          else {
            folders[i].open(Folder.READ_ONLY);
            folders[i].close(false);
          }
        } catch (javax.mail.MessagingException me) {
          System.err.println(me);
        }

with the following output:

DEBUG: setDebug: JavaMail version 1.3.1
* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS STARTTLS AUTH=LOGIN] localhost IMAP4rev1 2003.338 at Thu, 24 Jul 2003 12:34:16 -0700 (PDT)
A0 CAPABILITY
* CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS BINARY UNSELECT SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND LOGIN-REFERRALS STARTTLS AUTH=LOGIN
A0 OK CAPABILITY completed
A1 OK [CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS BINARY UNSELECT SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] User xxx authenticated
A2 LIST "" mail/amp
* LIST (\NoSelect) "/" mail/amp
A2 OK LIST completed
A3 LIST "" "mail/amp/%"
* LIST (\NoSelect) "/" mail/amp/
* LIST (\NoInferiors \UnMarked) "/" "mail/amp/b &- d"
* LIST (\NoInferiors \UnMarked) "/" "mail/amp/C & D"
A3 OK LIST completed
mail/amp/b & d
A4 LIST "" "mail/amp/b &- d"
* LIST (\NoInferiors \UnMarked) "/" "mail/amp/b &- d"
A4 OK LIST completed
DEBUG: connection available -- size: 1
A5 EXAMINE "mail/amp/b &- d"
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1059075256] UID validity status
* OK [UIDNEXT 1] Predicted next UID
* FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS ()] Permanent flags
A5 OK [READ-ONLY] EXAMINE completed
A6 CLOSE
A6 OK CLOSE completed
DEBUG: added an Authenticated connection -- size: 1


mail/amp/C
A7 LIST "" "mail/amp/C "
A7 OK LIST completed
 (doesn't exist?)

As you can see, the folder name of 'b &- d' comes out as 'b & d' and of 'C & D' comes 
out as 'C '.
This makes in difficult, if not impossible to access the folders.

I also tried this with pine (no problems), mozilla mail (folders appears as 'b & e' 
and 'C D'),
and KMail (folders appears as 'b & e' and 'C D', but I can' access the messages in
the folders)

And if I read RFC3501, section 5.1.3, correctly, isn't the imap server supposed to 
escape the
'&' properly since this is the signal to the client that the string is BASE64 encoded?


So what is going on here, and how do I fix/get around this problem.


Thanks

    George
--
[EMAIL PROTECTED]       ITServices, UBC
Programmer/Analyst

phone: 604.822.4375 fax: 604.822.5116

--
------------------------------------------------------------------
For information about this mailing list, and its archives, see: http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

Reply via email to