[
https://issues.apache.org/jira/browse/GERONIMO-6565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15974829#comment-15974829
]
Matthew Broadhead commented on GERONIMO-6565:
---------------------------------------------
i wonder why doesn't this bit work properly? maybe dovecot is not returning
the correct response? i am starting to wonder if it is a server configuration
issue
{code}
/**
* Return the character used by this folder's Store to separate path
components.
*
* @return the name separater character
* @throws MessagingException if there was a problem accessing the store
*/
public synchronized char getSeparator() throws MessagingException {
// not determined yet, we need to ask the server for the information
if (separator == UNDETERMINED) {
IMAPConnection connection = getConnection();
try {
List responses = connection.list("", fullname);
IMAPListResponse info = findListResponse(responses, fullname);
// if we didn't get any hits, then we just assume a reasonable
default.
if (info == null) {
separator = '/';
}
else {
separator = info.separator;
// this can be omitted in the response, so assume a default
if (separator == '\0') {
separator = '/';
}
}
} finally {
releaseConnection(connection);
}
}
return separator;
}
{code}
> Store.getDefaultFolder().list("*") sends wrong command
> ------------------------------------------------------
>
> Key: GERONIMO-6565
> URL: https://issues.apache.org/jira/browse/GERONIMO-6565
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Environment: TomEE 7.0.2
> Reporter: Matthew Broadhead
> Attachments: filterFolders.diff
>
>
> 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
> {code:java}
> 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("*");
> {code}
> Debugging shows that it sends the following command which results in a blank
> list
> {code}
> a90 LIST / "*"
> a90 OK List completed.
> {code}
> 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
> {code}
> LIST "" "*"
> {code}
> Is there a setting somewhere to tell it to omit the slash at the beginning?
> i.e. define the root namespace
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)