Charles McNulty wrote:
Which mail clients? I can only test with Thunderbird, but without a doubt it marks deleted messages as "seen" and futhermore does not restore the "unseen" flag if you undelete a message. I think a perfectly rational argument could be made for both cases, and that it depends solely on how you use/interpret the "new" flag. For some the act of deleting a message is enough to mark it as seen. To use an analogy, if I throw away a piece of snail mail unopened and my girlfriend asks me if I've seen it, my response would be "yeah, I saw it, and I threw it away." In any case, given my opinion that it could go either way, I'm more interested in the consensus of other clients. Given a scenario where there are two "right" answers, I'd prefer to program the more popular "right" answer.
-Charles
Thunder bird works as I described. Take a bunch of emails that are not read (i.e. still bold), highlight them all and delete them. they all move to the trash folder unread (i.e. the trash folder now has unread messages). good old terminal mail clients like mutt and pine do the same thing. there are separate flags for seen (i.e. read) and mark as deleted. for example in mutt, if you were to check your email after doing the described action above, you would see a bunch of emails in your inbox marked as deleted but not marked as read (there is no "unseen" flag). below are the flags allowed by the RFC, marking a message as deleted should do only that, other markings should be controlled by separate functions (unless explicitly optioned otherwise by the user).
2.3.2. Flags Message Attribute
A list of zero or more named tokens associated with the message. A
flag is set by its addition to this list, and is cleared by its
removal. There are two types of flags in IMAP4rev1. A flag of
either type may be permanent or session-only.
A system flag is a flag name that is pre-defined in this
specification. All system flags begin with "\". Certain system
flags (\Deleted and \Seen) have special semantics described
elsewhere. The currently-defined system flags are:
\Seen Message has been read
\Answered Message has been answered
\Flagged Message is "flagged" for urgent/special attention
\Deleted Message is "deleted" for removal by later EXPUNGE
\Draft Message has not completed composition (marked as a
draft).
\Recent Message is "recently" arrived in this mailbox. This
session is the first session to have been notified
about this message; subsequent sessions will not see
\Recent set for this message. This flag can not be
altered by the client.
If it is not possible to determine whether or not
this session is the first session to be notified
about a message, then that message SHOULD be
considered recent.
If multiple connections have the same mailbox
selected simultaneously, it is undefined which of
these connections will see newly-arrives messages
with \Recent set and which will see it without
\Recent set.