On Saturday, 21 January 2006 at 13:17, Phil Pennock wrote: > On 2006-01-20 at 13:34 -0800, Brendan Cully wrote: > > This code was rewritten because the recent flag tends to disappear a > > lot (if you use multiple clients, including biffs). You get a lot of > > messages marked O that should be N. Now you lose the O flag if you > > can't write to the mailbox, but I believe this is how other mailbox > > formats work too. > > I use mutt and gbuffy; gbuffy correctly uses EXAMINE instead of SELECT > and an IMAP server should not be updating \Recent based on an EXAMINE. > Cyrus doesn't. > > RFC 3501, 2.3.2. Flags Message Attribute: > \Recent > Message is "recently" arrived in this mailbox. This session > is the first session to have been notified about this > message; if the session is read-write, subsequent sessions > will not see \Recent set for this message. This flag can not > be altered by the client. > > Although that doesn't explicitly say that a read-only session won't > reset \Recent, the implication is clear. I'm afraid you're being a little naive about the IMAP RFC :) Cyrus is probably the best-behaved IMAP server in existence, which is why I use it myself. But many other servers drop that flag on the flimsiest of excuses (this includes UW). There have been enough complaints about mutt's reliance on \Recent over the years that I really would prefer to avoid using it at all. > > this takes us back to mutt's old behaviour, which was too vulnerable > > to the whims of the recent flag. I like the current behaviour better. > > If I make it a mutt configurable option defaulting to your preferred > behaviour, would that be acceptable? I'd go for the simpler code > change, flagging all unseen non-recent mails, but combining it with the > mutt option. I'm afraid that then turning the setting on or off will produce a strange mish-mash of flags in the mailbox. Also it's Yet Another Configuration Variable Only Three People Will Ever Use. > > I'm a little confused about why you don't have write access to your > > folders, but I think mutt's "old" response is now basically the same > > for IMAP and mbox. > > Shared folders for access by multiple members of staff; Cyrus doesn't > have normal flag attributes be per-user, they're shared. Of the top of > my head, that's correct. Shared folders seem like the perfect place for a non-awesome IMAP server to forget who should see \Recent flags for what. I'm pretty sure the Seen flag is per-user, so you could perhaps just mark Old messages as Seen... > Alternatively, since the patch I submitted before carefully uses the new > semantics _if_ the server supports the old flag, perhaps that's close > enough? I could change the detection logic to use imap_has_flag() > instead, which would then use \* as well as "old" ? I guess I could see a case for using Unseen but not Recent to mean Old if and only if: 1. the mailbox does not have Old in FLAGS or PERMANENTFLAGS 2. the mailbox also does not have \*, OR the user does not have write permission. even then I'm not super keen, because it makes mutt's behaviour less predictable. Which was the problem with the Recent flag in the beginning - you'd get different results depending on which server you were using and what other programs might be accessing your mailbox. To the list: is anyone else bothered by the current Old behaviour? would you like an option to revert to the old Old behaviour?
Attachment:
pgpqs1VhGIZac.pgp
Description: PGP signature