~rjarry/aerc#242: 
Recent status cleared on aerc startup for IMAP

To reproduce:

  1. Exit aerc if running.
  2. Indicate the Recent message count in tab title, such as
tab-title-account={{.Account}}{{if .Recent}} ({{.Recent}}){{end}}
  1. Send yourself a message without opening the mailbox (via sendmail or similar) and give it enough time to arrive.
  2. Open aerc and watch the tab title. The correct Recent count appears there for a split second and then disappears as the mailbox loads.
Status
REPORTED
Submitter
~balejk
Assigned to
No-one
Submitted
1 year, 13 days ago
Updated
27 days ago
Labels
No labels applied.

~balejk 11 months ago

Conversely, although it's probably not related directly, the status isn't cleared when the new messages are read (or marked as read) and one has to change folder (another folder of the same account, not just different account/tab) to clear it. ~inwit reports to be seeing the same thing for {{.Unread}} (if I understood and remember correctly) -- I only have the unread count displayed in the folder list (so the defaults), rather than the tab title, and there it changes immediately and correctly for me when I read or unread a message.

~balejk referenced this from #138 11 months ago

~simartin 28 days ago

If I understand the ticket properly, https://lists.sr.ht/~rjarry/aerc-devel/patches/58306 is likely to address the Unread part.

I don't think it addresses the Recent case, that has different semantics according to https://datatracker.ietf.org/doc/html/rfc3501#section-2.3.2: one session and only one will see it, and it will clear if the session drops for any reason (or aerc is closed/reopened).

~balejk 27 days ago

Ah, you are right, the RFC says that "This flag can not be altered by the client.", so it seems that it is OK that the .Recent count can only go up as far as IMAP is concerned. Basically what I had in mind was that aerc should only consider as "recent" messages that have the \Recent flag set and not the \Seen flag, but that probably doesn't make sense then.

As for the startup, I still see the recent flags get cleared. My suspicion is that aerc is actually opening the mailbox more than once during startup (i. e. there is some "session drop" as you write).

Register here or Log in to comment, or comment via email.