Subject: [Extra] IMAP4rev2 , \recent and search new

From: Arnt Gulbrandsen <[email-masked]>
Date: Mon, 28 Oct 2019 13:45:24 +0100

I had a look at the draft recently and will be sending a number of 
messages, each pointing out a single issue, mostly simple. I'll space them 
out and send one every few days. First up: search new and \recent.

I suggest that deprecating \recent be given a rationale. I suggest the 
following additional paragraph in 2.3.2:

"Many modern IMAP clients automatically reconnect. For example, mobile 
email clients may dis- and reconnect whenever they enter or leave an area 
with WLAN coverage. Because of this, messages can lose their \recent status 
apparently at random, and using \recent (e.g. via the NEW search key) has 
become unreliable. For this reason (among others), \recent is now 
deprecated."

The NEW search key needs to be changed, either to deprecate it or to make 
it an alias for UNSEEN. I think the best course of action is the one that 
permits the smallest client diff. Suggested wording for section 6.4.4:

"Since \recent is now deprecated, the NEW search key may now be an alias 
for the UNSEEN. Servers that also advertise IMAP4rev1 may implement NEW 
either as an alias for UNSEEN or as specified in IMAP4rev1. Clients that 
implement IMAP4rev2 should not rely on either NEW being equal to UNSEEN or 
NEW returning a subset of UNSEEN."

Section 6.3.2 contains an example that doesn't include RECENT. I suggest an 
additional paragraph:

"Note that IMAP4rev1 compliant servers also send e.g. "* 0 RECENT", which 
IMAP4rev2 clients are advised to ignore."

Arnt

---

From: Brandon Long <[email-masked]>
Date: Mon, 28 Oct 2019 13:33:57 -0700

Pretty sure we implement it as "nothing is \Recent", which is also valid in
the sense that it's always possible a different client saw them as new
first.

Using UNSEEN seems like a different type of lie, it is closer to what
\Recent means... but since they both existed, one would think the
difference between them may be what people consider useful.

Brandon

On Mon, Oct 28, 2019 at 5:45 AM Arnt Gulbrandsen <[email-masked]>
wrote:

> _______________________________________________
> Extra mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/extra
>

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Mon, 28 Oct 2019 21:54:13 +0100

On Monday 28 October 2019 21:33:57 CET, Brandon Long wrote:
> Using UNSEEN seems like a different type of lie, it is closer 
> to what \Recent means... but since they both existed, one would 
> think the difference between them may be what people consider 
> useful.

I suggested (optionally) aliasing it to UNSEEN since it seemed to me that 
any client that issues SEARCH NEW would want the search resunt to sometimes 
be nonempty.

Arnt

---

From: "Bron Gondwana" <[email-masked]>
Date: Tue, 29 Oct 2019 13:53:24 +1100

> any client that issues SEARCH NEW would want the search resunt to sometimes 

I think I'd prefer for it to just return the empty set, easy to implement and won't confuse anything.

UNSEEN can have messages appear and disappear from the set, whereas a message can never go from un\Recent to \Recent.

Bron.

--
 Bron Gondwana, CEO, Fastmail Pty Ltd
 [email-masked]

---

From: Alexey Melnikov <[email-masked]>
Date: Tue, 29 Oct 2019 11:12:07 +0000

On 28/10/2019 20:54, Arnt Gulbrandsen wrote:

> I suggested (optionally) aliasing it to UNSEEN since it seemed to me 
> that any client that issues SEARCH NEW would want the search resunt to 
> sometimes be nonempty.

Maybe we should just deprecate NEW and add some explanatory text?

---

From: "Bron Gondwana" <[email-masked]>
Date: Tue, 29 Oct 2019 22:13:50 +1100

> Maybe we should just deprecate NEW and add some explanatory text?

I think deprecate NEW and allow it to always return empty is right (with the text of course).

Bron.

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Tue, 29 Oct 2019 13:14:42 +0100

> right (with the text of course).

Since gmail has done that for a while I think it's a perfectly acceptable 
course of action... and NEW/\recent isn't worth much heartache, so anything 
good is better than a search for best.

Suggested text: "Since \recent is now deprecated, the NEW search key is 
also deprecated. IMAP4rev2-capable servers MAY match no messages (ie. make 
NEW an alias for NONE), servers that also implement IMAP4rev1 MAY 
alternatively choose to implement NEW as specified in RFC3501, and clients 
that implement IMAP4rev2 MUST NOT rely on any particular behaviour."

Arnt

---

From: "Bron Gondwana" <[email-masked]>
Date: Wed, 30 Oct 2019 06:54:26 +1100

> that implement IMAP4rev2 MUST NOT rely on any particular behaviour."

Looks great to me.

Bron.