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

MOVE command does not return CopyUID causing NullPointerException in jakarta.mail #445

Closed
kumotaicho opened this issue Mar 2, 2022 · 3 comments
Assignees
Labels
Milestone

Comments

@kumotaicho
Copy link

jakarta.mail (1.6.7) throws NullPointerException when using IMAPFolder.moveUIDMessages because the MOVE command does not return the CopyUID (greenmail 1.6.6).

@marcelmay marcelmay self-assigned this Mar 2, 2022
@marcelmay marcelmay added the bug label Mar 2, 2022
@marcelmay
Copy link
Member

GreenMail expected a UID MOVE command, but JavaMail actually only sends a MOVE without UID:

A10 MOVE 1:3 INBOX.target-folder
* 1 EXPUNGE
* 1 EXPUNGE
* 1 EXPUNGE
A10 OK MOVE completed.

According to the MOVE RFC, it should have been a UID MOVE like this:

C: a UID MOVE 42:69 foo
S: * OK [COPYUID 432432 42:69 1202:1229]
S: * 22 EXPUNGE
S: (more expunges)
S: a OK Done

It seems to be a known issue with JavaMail: jakartaee/mail-api#329

For now GreenMail will change to always return the COPYUID.

@marcelmay
Copy link
Member

Thx alot for raising this issue @kumotaicho , there will be a small 1.6.7 release soon.

@kumotaicho
Copy link
Author

Thank you very much for your quick reply and reaction @marcelmay !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants