New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
javamail cannot issue UID FETCH and doesn't fully support workaround #197
Comments
@glassfishrobot Commented |
@glassfishrobot Commented Addressing this has been on my wish list for years, but it's unlikely to What performance data do you have showing that the extra round trip is an |
@glassfishrobot Commented IMAP may have been built around sequence numbers, but UID FETCH/STORE/SEARCH are required IMAP 4 commands. An IMAP library certainly doesn't have to support them. But they were put in the protocol for this very reason. |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
Javamail doesn't support UID FETCH at present. You can get a Message by UID and then do a FETCH by sequence number, but that's an extra round trip.
The semi-obvious workaround for this is to use Folder.doCommand() and issue a UID FETCH of your own:
And this works... mostly. If there's a message with that UID in the folder, the IMAP server will return an untagged FETCH response which will be caught by Protocol.simpleCommand() and handed off to Protocol.notifyResponseHandlers() and then to IMAPFolder.handleResponse(). It finally lands in IMAPFolder.processFetchResponse(), which handles UID, MODSEQ, FLAGS, and extensions. Everything else is dropped. (IMAPFolder.handleResponse also sends a MessageChangedEvent, which is not optimal, but it's not an issue for me as I don't have any listeners active on the Folder.)
Would it be possible to either
a) support UID FETCH directly, or
b) have IMAPFolder.processFetchResponse() handle at least a larger subset of the other fetch items, like IMAPMessage.handleFetchItem() does?
Affected Versions
1.5.5
Environment
PC
Mac OS
The text was updated successfully, but these errors were encountered: