Skip to content
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

UID MOVE/COPY support #329

Open
glassfishrobot opened this issue Aug 9, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@glassfishrobot
Copy link

commented Aug 9, 2018

When trying to switch a client to use moveUIDMessages instead of moveMessages, I noticed that the IMAPProtocol still issues a MOVE command with sequence numbers to move the messages. Instead, the only difference seems to be the parsing of the COPYUID tagged response.

I had expected it to use the UID MOVE command, especially since the moveuid method already depends on both the MOVE and UIDPLUS extensions, and copymoveUIDMessages already fetches UID information for all messages.

The same applies to copyUIDMessages and UID COPY, except that it does not rely on the MOVE extension.

The only releated issue I could find is #167. The conversaion seems to imply that the correct way to support this would be new methods (moveMessagesByUID, copyMessagesByUID), which of course would also be fine to keep backwards-compatibility, even though the existing methods seem fitting (from my layman's perspective).

@glassfishrobot

This comment has been minimized.

Copy link
Author

commented Aug 15, 2018

@bshannon Commented
Is this causing any problem? Is anything not working correctly because of this?

The IMAP protocol was designed with sequence numbers as the primary way to identify
messages, and that's what JavaMail uses. If both the UID and the sequence number for
a message are known, the sequence number is preferred. There's an issue requesting
better support for a UID-only model, but that's a significant change to JavaMail.

Adding the "ByUID" methods is still worth considering as a workaround for the case where
you have the UIDs of the messages but not the Message objects.

@glassfishrobot

This comment has been minimized.

Copy link
Author

commented Sep 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.