POP3Folder and POP3Message are both included in the javadoc for the
Javamail API...

http://javamail.kenai.com/nonav/javadocs/index.html?com/sun/mail/pop3/package-summary.html

And the license that comes in the API download explicitly lists
pop3.jar along with mail.jar as redistributables.

So is this a licensing issue or a dependence issue?

It's necessary to access the POP3Folder to get the UID.  Without the
UID, the exchange can't be tied back to the original message once the
folder's been closed.

There are two alternatives I can see that don't involve the POP3Folder...

1. Generate UIDs from the message similarly to how POP3 servers
generate them: hashing the message.  So a message would be hashed on
the way in, and then re-hashed to sync it.  You'd still want to know
that a message is a POP3 message, so that you're not unnecessarily
hashing IMAP messages, but that can come from the endpoint
configuration without involving the actual POP3-specific classes.

2. Set the DELETE flag on the message as the exchange is being
created, rather than in processCommit.  This will work with POP3 or
IMAP messages without checking the protocol.  If you want to minimize
the risk, you can take messages one at a time rather than all at once.

But it seems easier to me to use the POP3 classes.

Don


On Mon, Jun 20, 2011 at 9:25 AM, Donald Whytock <dwhyt...@gmail.com> wrote:
> com.sun.mail.pop3.POP3Folder and com.sun.mail.pop3.POP3Message are
> supplied by mail.jar in the Javamail API, version 1.4.4.  If the mail
> component can't be dependent on part of mail.jar, does that mean it
> can't be dependent on any of mail.jar?
>
> Don
>
> On Mon, Jun 20, 2011 at 2:57 AM, Claus Ibsen (JIRA) <j...@apache.org> wrote:
>>
>>    [ 
>> https://issues.apache.org/jira/browse/CAMEL-3948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051826#comment-13051826
>>  ]
>>
>> Claus Ibsen commented on CAMEL-3948:
>> ------------------------------------
>>
>> This patch cannot be accepted as it uses some internal sun code, eg it has 
>> these imports
>> {code}
>> import com.sun.mail.pop3.POP3Folder;
>> import com.sun.mail.pop3.POP3Message;
>> {code}
>>
>>
>>> Issue with the RSET command with POP3 servers
>>> ---------------------------------------------
>>>
>>>                 Key: CAMEL-3948
>>>                 URL: https://issues.apache.org/jira/browse/CAMEL-3948
>>>             Project: Camel
>>>          Issue Type: Bug
>>>          Components: camel-mail
>>>    Affects Versions: 2.7.0
>>>            Reporter: Hadrian Zbarcea
>>>             Fix For: 2.8.0
>>>
>>>         Attachments: MailConsumer.java
>>>
>>>
>>> Issue is discussed in this 
>>> [thread|http://camel.465427.n5.nabble.com/POP3-mail-deletion-td4370158.html].
>>> Note: Donald posted interesting and helpful findings.
>>
>> --
>> This message is automatically generated by JIRA.
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>>
>

Reply via email to