dep via tde-users wrote:
My sense is that KMail and ProtonMail differ in how they register that a message has been read. I was hoping to find out how KMail does this and whether there is some setting that I could change to bring it more in line with how it is done elsewhere. And yes, I suppose that it could simply be a bug in KMail, but I don't know enough to be able to pin it down.
Well, AFAIK it should be a representation of the content on the server where the mailbox is present.
The Gemini says following, so may be you collect (sniff) the communication and see what is going on:
In the IMAP world, "reading" a message is all about a specific system flag called \Seen. Unlike POP3, which usually just downloads and forgets, IMAP stores the state of every message on the server so your phone, laptop, and tablet all stay in sync.
Here is the breakdown of how your client marks a message as read: 1. The Manual Method: The STORE Command
When you click on an email or manually mark it as read, your client sends a STORE command to the server. This command tells the server to add the \Seen flag to a specific message ID.
A typical command sent by your client looks like this: A001 STORE 42 +FLAGS (\Seen)
A001: A unique tag for the command.
STORE: The command to change message data.
42: The sequence number (or UID) of the email.
+FLAGS (\Seen): Tells the server: "Keep the existing flags, but add the 'Seen' flag."
2. The Automatic Method: The FETCH Side Effect
By default, most IMAP servers will automatically mark a message as read the moment a client asks to see the full body of the email using the FETCH command.
If your client sends: A002 FETCH 42 (BODY[TEXT]) The server sends the text back and immediately flips the \Seen flag to "on."
Pro Tip: If your client wants to preview a message without marking it as read (like a notification or a search preview), it uses a special command called BODY.PEEK. This tells the server: "Let me look, but don't touch the Seen flag."
3. Why is it still "Unread" on my other device?
If you read an email on your phone but it still shows as unread on your laptop, it’s usually because of one of two things:
The IDLE Command: Your laptop hasn't "checked in" with the server recently. Modern clients use the IDLE command to get real-time "push" updates from the server when flags change.
Read-Only Mode: If your client opened the folder in EXAMINE mode (read-only) instead of SELECT mode (read/write), any attempt to mark it as read will be rejected by the server.
Summary of System Flags
The \Seen flag is part of a "Big 5" set of standard IMAP flags:
\Seen: You've read it.
\Answered: You've replied to it.
\Flagged: You marked it for follow-up.
\Deleted: You put it in the trash (but haven't "purged" it yet).
\Draft: You haven't finished writing it.
Would you like me to show you the specific command to mark a message as "Unread" again if you accidentally clicked it?