JavaMail setFlags on readonly folder
Hi, I'm facing a strange issue using JavaMail, where Dovecot let me open "READ_WRITE" a folder with readonly ACLs (same happens on other imap servers), but then doesn't issue any error when if try to setFlags(...) on that folder. The result is that the code thinks the folder marked the messages (deleted, flagged, etc), while it actually did not. Just refreshing the folder from the java client, you get back your original messages as they were before the operation. Is there any known issue about this? Gabriele
Sonicle S.r.l. : http://www.sonicle.com Music: http://www.gabrielebulfon.com Quantum Mechanics : http://www.cdbaby.com/cd/gabrielebulfon
On 20 Apr 2017, at 15.13, Gabriele Bulfon <gbulfon@sonicle.com> wrote:
Hi, I'm facing a strange issue using JavaMail, where Dovecot let me open "READ_WRITE" a folder with readonly ACLs (same happens on other imap servers), but then doesn't issue any error when if try to setFlags(...) on that folder. The result is that the code thinks the folder marked the messages (deleted, flagged, etc), while it actually did not. Just refreshing the folder from the java client, you get back your original messages as they were before the operation. Is there any known issue about this?
Dovecot used to return NO in such case a long time ago, but it caused user-visible errors with some client when accessing a read-only folder. So it was a bit annoying. I'm not sure if it would still happen with commonly used clients.
Also if the client is using STORE without the .SILENT option, it could check whether the STORE really did something by looking at the FETCH (FLAGS) replies. What could be a useful change to Dovecot is that if .SILENT is used and it doesn't do the change as expected, Dovecot could send FETCH (FLAGS) replies using the unchanged flags.
participants (2)
-
Gabriele Bulfon
-
Timo Sirainen