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

Flagging of messages should be optional. #9613

Closed
alexandru-mng opened this issue Oct 29, 2024 · 2 comments
Closed

Flagging of messages should be optional. #9613

alexandru-mng opened this issue Oct 29, 2024 · 2 comments

Comments

@alexandru-mng
Copy link

Expected Behavior
Flagging of messages should be optional similar with SearchTermStrategy

It would be ideal to simply bypass the default behaviour when a custom SearchTermStrategy is used.

Current Behavior
Messages are always flagged when the email server does not support \Recent or user flags even when that flag is not used when searching for new new messages.

How has this issue affected you?
Microsoft Exchange does not support \Recent or user flags, thus ImapMailReceiver always flags the read messages.
Screenshot from 2024-10-29 22-14-28

Are you aware of any workarounds?
I am not sure if this even works, but it may be a workaround.
https://stackoverflow.com/questions/62214324/java-mail-listner-this-email-server-does-not-support-recent-or-user-flags

What other alternatives have you considered?
Override ImapMailReceiver.setAdditionalFlags in order to remove the 'FLAGGED' flag, but this is not a viable solution because it may remove a "real" Follow-up flag.

@alexandru-mng alexandru-mng added status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement labels Oct 29, 2024
@artembilan artembilan added in: mail and removed status: waiting-for-triage The issue need to be evaluated and its future decided labels Oct 29, 2024
@artembilan
Copy link
Member

@alexandru-mng ,

if you see what can be done from the framework perspective, feel free to contribute the fix: https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc.

I'm not sure yet what is going on, but will be happy to review PR.

Thanks

@artembilan artembilan added this to the 6.4.0 milestone Oct 31, 2024
@artembilan
Copy link
Member

Please, find the fix in the linked commit.

Thank you for the report anyway!

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

No branches or pull requests

2 participants