Hi, I've a set of public mailboxes that all users can access. The index is stored per user, so each user can mark the message as read for themselves.
This is with dovecot 1.2.10. However, when selecting the mailbox, system flags are not announced as permanent but only as session flags: 3619 SELECT "public.Admin" * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) * OK [PERMANENTFLAGS ()] Read-only mailbox. * 324 EXISTS * 0 RECENT * OK [UNSEEN 171] First unseen. * OK [UIDVALIDITY 1254326934] UIDs valid * OK [UIDNEXT 1102] Predicted next UID * OK [HIGHESTMODSEQ 1] Highest 3445 OK [READ-ONLY] Select completed. I think (reading the RFC, but I bet you know it better than me) that FLAGS should also been set in PERMANENTFLAGS since they can be permanent. The relevant code seems to be in commands-util.c (dovecot 1.2.11): void client_send_mailbox_flags(struct client *client, bool selecting) { […] if (mailbox_is_readonly(client->mailbox)) { client_send_line(client, "* OK [PERMANENTFLAGS ()] " "Read-only mailbox."); } else { […] } } Even if it's true that the Maildir is read-only, it's still possible to store \Seen permanently. Am I getting things wrong, or is this a bug? If I'm correct, a simple fix MAY be not to send the PERMANENTFLAGS at all since the RFC says: OK [PERMANENTFLAGS (<list of flags>)] A list of message flags that the client can change permanently. If this is missing, the client should assume that all flags can be changed permanently. Thanks, -- Julien Danjou // ᐰ <jul...@danjou.info> http://julien.danjou.info
pgp7NzQEMTaXq.pgp
Description: PGP signature