Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-6565

Store.getDefaultFolder().list("*") sends wrong command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • Security Level: public (Regular issues)
    • None
    • TomEE 7.0.2

    Description

      using TomEE 7.0.2 with package geronimo-javamail_1.4_mail-1.9.0-alpha-2.jar. i try to list folders in a store

      import javax.mail.Folder;
      import javax.mail.Session;
      import javax.mail.Store;
      ...
      Properties properties = System.getProperties();
      properties.setProperty("mail.debug", "true");
      Session session = Session.getDefaultInstance(properties, null);
      session.setDebug(true);
      Store store = session.getStore("imaps");
      store.connect("imap.domain.tld", "username", password);
      Folder[] folders = store.getDefaultFolder().list("*");
      

      Debugging shows that it sends the following command which results in a blank list

      a90 LIST / "*"
      a90 OK List completed.
      

      Whereas testing with the tutorial on https://delog.wordpress.com/2011/05/10/access-imap-server-from-the-command-line-using-openssl/ the command works correctly as

      LIST "" "*"
      

      Is there a setting somewhere to tell it to omit the slash at the beginning? i.e. define the root namespace

      Attachments

        1. filterFolders.diff
          0.9 kB
          Matthew Broadhead
        2. filterFolders.diff
          1 kB
          Matthew Broadhead
        3. filterFolders.diff
          3 kB
          Matthew Broadhead

        Activity

          People

            Unassigned Unassigned
            chongma Matthew Broadhead
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: