Re: Which application uses GNU JavaMail ?

Cedric Hyppolite <[email protected]> Tue, 14 Feb 2006 20:17:10 +0100
Newsgroups gmane.comp.java.classpath.extensions.discuss
Message-ID <[email protected]>
Hi Chris,

I used tcpflow with Gnu provider. Sun did take into account the =20
mail.debug property so I got the command directly.

Sun provider does:
A6 LIST "" "INBOX/%"
* LIST () "/" INBOX/sent-mail
* LIST () "/" INBOX/JXTA
* LIST () "/" INBOX/Pouic
* LIST () "/" INBOX/spam
* LIST () "/" INBOX/NonSpam
* LIST () "/" INBOX/Apple
A6 OK LIST completed

where Gnu provider does:
A10 LIST INBOX %
* LIST () "/" INBOX
A10 OK LIST completed

- Another difference is that Sun provider gives the folder a type 3 =20
(holds folder & messages) where Gnu provider gives a type 2 (holds =20
message).

- Sun provider throws a FolderNotFoundException on listing of the =20
personal/user/shared namespace, where Gnu gives an empty array. I =20
prefers the GNU provider behaviour.

- On the logging problem: I am running under Eclipse, but that should =20=

not prevent logging from working as I use commons-logging and log4j =20
without problems.

Conclusion:
On the folder type issue, I guess everything (but the root) should be =20=

of type 3 even if there is no 'inferior' folder for now i.e. the API =20
says for HOLDS_FOLDER: 'This folder CAN contain other folders'.

It may happen that both list commands are valid but one is 'more =20
supported' that the other.
I let you make the fix on your side. I guess it is pretty obvious now.

Regards,
Cedric

Le 14 f=C3=A9vr. 06 =C3=A0 10:04, Chris Burdess a =C3=A9crit :

> Cedric Hyppolite wrote:
>>>> I ran the test with the latest CVS version for javamail and =20
>>>> inetlib.
>>>> Same result, the listing is still looping.
>>>
>>> It seems bizarre that the IMAP server would include the current =20
>>> folder in a LIST. I would try setting the session property =20
>>> mail.debug=3Dtrue and looking at the IMAP conversation.
>>
>> Setting mail.debug to true or calling Session.setDebug(true) did =20
>> not enable the imap logger.
>
> That's odd. Is any logging working? Do you have a specialised =20
> java.util.logging configuration?
>
>> However I added to print statement, and the server response to the =20=

>> list command only consist in repeating the listed mailbox.
>
> and the LIST command is something like
>
>   a002 LIST "" %
>
> right?
>
>> I looked at thunderbird code and they list the IMAP folder from =20
>> the root using a '*' wildcard.
>> I tried this on the default folder and successfully listed all my =20
>> IMAP folders.
>
> The '*' wildcard lists the entire hierarchy, not just the immediate =20=

> children.
>
>> However the folder separator character is not interpreted in the =20
>> returned names...
>
> What does it return, NIL?
>
>> That would be a way to read mails in all IMAP folders forgetting =20
>> the hierarchy thus seeing all folders under the root.
>
> Not really, since this would give you all folders independent of =20
> the hierarchy, but with no way to interpret that hierarchy.
>
> I would really appreciate seeing transcripts of the same JavaMail =20
> conversation with both Sun and GNU JavaMail for this server, if you =20=

> can provide them. If you're having problems with logging you could =20
> use tcpflow.
> --=20
> =E7=8A=AC Chris Burdess
>   "They that can give up essential liberty to obtain a little safety
>   deserve neither liberty nor safety." - Benjamin Franklin
>
>
>
>