Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Clear Recent Flag?

25 views
Skip to first unread message

Chuck Anderson

unread,
Jun 8, 2013, 3:57:38 PM6/8/13
to
I have written an imap client using Php imap functions.

When I move a message to a new folder ('Trash'), it is marked as Recent
and my client highlights that folder as having unread messages. Can I
clear the Recent flag without opening that new folder?

--
*****************************
Chuck Anderson • Boulder, CO
http://cycletourist.com
Turn Off, Tune Out, Drop In
*****************************

Sam

unread,
Jun 9, 2013, 10:57:42 PM6/9/13
to
Chuck Anderson writes:

> I have written an imap client using Php imap functions.
>
> When I move a message to a new folder ('Trash'), it is marked as Recent and
> my client highlights that folder as having unread messages. Can I clear the
> Recent flag without opening that new folder?

Nope. Because the Recent flag is cleared by opening the folder.

Now, nothing says that the folder must be opened by the same client that
will be later opening, and not expecting the Recent flag to be there. You
are free to arrange for your own, some kind of an internal, client, to come
in and clean things up, when you need to.

Having said that: I'm fairly certain that nobody of any importance really
cares about this flag. Its semantics were so confusing, that pretty much
everyone had different ideas how it should work. Furthermore, it's one of
those things in IMAP whose formal description is full of "well, if this
happens, then this whole thing is undefined" and "there's lot of stuff in
here that's implementation defined", or "a good chunk of this is just a
SHOULD, not a MUST, so you really can't rely on any predictable semantics
here". So, most clients have evolved to ignore this flag, and not use it for
anything. All IMAP clients do, for all practical matters, is show whether
the given message is read or unread, and they use the Seen flag, instead.

Or, each client individually keeps track of which messages it has seen, so
far, and when a new message appears in a folder, that the client has never
seen before, the client treats it as "Recent", whatever it means, ignoring
this flag.

Chuck Anderson

unread,
Jun 9, 2013, 11:59:52 PM6/9/13
to
Thank you. You make a good point about the "Recent" status. And what a
simple solution for me. I'll make my client ignore Recent, as well. I
hadn't thought of that. Simple and logical. I am converting to using a
database to store messages, so I'll be able to determine a message's
recentness by my own means, ... if need be.
0 new messages