Re: [Jmap] simpler future release & unsend without outbox (was Re: Best vs Good enough - adoption of JMAP)

Neil Jenkins <neilj@fastmail.com> Fri, 28 April 2017 05:48 UTC

Return-Path: <neilj@fastmail.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4D04A127A90 for <jmap@ietfa.amsl.com>; Thu, 27 Apr 2017 22:48:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level:
X-Spam-Status: No, score=-2.72 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmail.com header.b=ObdWCC3+; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=DkPVH97F
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gsewNngjHxBW for <jmap@ietfa.amsl.com>; Thu, 27 Apr 2017 22:48:33 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 218521294FD for <jmap@ietf.org>; Thu, 27 Apr 2017 22:46:27 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id 830CC20A70; Fri, 28 Apr 2017 01:46:26 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Fri, 28 Apr 2017 01:46:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=YG0MbOAGXYyQ7N4XPA77yLA5Xhn8E n6qKc1xxAUHaWk=; b=ObdWCC3+JD0y52g50sULK+nZQVjagYslcZPiQCHCvZpQC LoCNfcgl00CSbQ6rM6Ug33jW8s/7kcbeiEBaJKpH09QZ6LAnzE4SlJckP9XEABpE sprgZOyY4RK0RxY+55WXP4Q0wbhMZfQqoxcA6Wg62d3yQLrDfqEm7xtAvpv1w0bF jcOu6JosSFjM5RD18Gd4Izpt8cK09POl7Dg+m3mUpxjBOYQNRniCSklPfhRpf3ZS lr0dVjU9EC0V8PbLyJ3DHcmtZXkcxWqlz3iUibrV+pUfIXywYupT+VOTFxEwUahr 2ePXm1ytmQ7e47MPAwJjT/xeBK5b5HVwf27xu5qOA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=YG0MbO AGXYyQ7N4XPA77yLA5Xhn8En6qKc1xxAUHaWk=; b=DkPVH97F+CEKP0Vc+SXeHb Kc0I1Ii64A0DDIVZ1lD4fQhus9dP2+cpb94d4Njacb8muaPieX9bagHC45v/vdYK y3AZR2iIIsuN3GjWVykkxSW0coXuvVHvwdK2dp4M2euNFDzO8BZjBQJ7n4XMvOrQ 7IQV4BWreSVis9UiCXoNIz4NinepxXbmGkrB14LiMxH97CA7+SnunhFqz/lNZlPt GPkNN0SD7zUnUIy0y9hQkytm87bWMzDyGfmQG7oADo2LGW5mW8v6cs3Ka/Pn5voO KRJzPjW2SiqDeFBD5O5yarJydNk09IXIGxiLa7K6KNrl6XBZpQWrH6j5jBkkB2/A ==
X-ME-Sender: <xms:MtcCWcOMzZ7FtgFvLl9NhOXIUS6fxheC5eSHpMPk0Y4S_japc2vlEQ>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 475E9E24CD; Fri, 28 Apr 2017 01:46:26 -0400 (EDT)
Message-Id: <1493358386.1136069.958999408.285D03F1@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmail.com>
To: Chris Newman <chris.newman@oracle.com>
Cc: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-843b6574
In-Reply-To: <BCF4ACFF-892C-464E-AAFD-1BB1822C5EF8@oracle.com>
References: <em8b177018-4769-44ea-b033-90bd8155d11b@bodybag> <46F700A6-C2B1-488B-A8B4-6ACD45B03C31@oracle.com> <CFC38D13-0CB2-4ABF-9403-DF0F773314B7@fugue.com> <D35A79C2-3918-4BB7-B97D-D56CA7548DCD@oracle.com> <1493099769.3023399.955193288.6D0312CC@webmail.messagingengine.com> <33553450-82F4-4CB4-8679-C9F52D8A8839@oracle.com> <1493163974.4122214.956244160.6735E49C@webmail.messagingengine.com> <EDCC6149-9222-468E-A17B-DDBA88A52D95@oracle.com> <1493185260.709114.956477904.75CB343B@webmail.messagingengine.com> <B2FD4698-E783-4D15-BA4E-B637A070E6A9@oracle.com> <1493248332.1295949.957537688.05443911@webmail.messagingengine.com> <BCF4ACFF-892C-464E-AAFD-1BB1822C5EF8@oracle.com>
Date: Fri, 28 Apr 2017 05:46:26 +0000
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/ZR_a76_GnydzAc5y68lNwE1-hWk>
Subject: Re: [Jmap] simpler future release & unsend without outbox (was Re: Best vs Good enough - adoption of JMAP)
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Apr 2017 05:48:35 -0000

On Thu, 27 Apr 2017, at 02:06 AM, Chris Newman wrote:
> Well, if you believe that and I don't believe that,

Then clearly we need to discover where the divergence in mental models
is occurring.

> * Every server that supports future release and unsend will provide
>   the same interface to the client. No need for the "always empty
>   outbox" alternative server behavior that you'll see with the outbox
>   model.

The server will have to advertise whether it supports scheduled send
regardless of the mechanics underneath. For servers that do not support
scheduled send, I agree that an always-empty outbox mailbox may feel a
little superfluous, however the point is to, as you say, always provide
the same interface to the client regardless. The client will know from
the capabilities that it must always be empty, so will probably hide it
in the sidebar or equivalent navigation mechanism (in fact I expect
clients will probably hide the outbox when empty regardless of scheduled
send support).

> * This does not unnecessarily constrain server implementation, and
>   permits simpler server designs.

I do not believe this to be the case, as I will explain below.

> * This preserves clean mail store and mail queue separation including
>   the security and operational benefits that provides.

This is I think where the confusion lies. The outbox really isn't a mail
queue, and no one is suggesting you merge it with your mail store.

You clearly have existing infrastructure that supports holding scheduled
messages inside your mail queue and possibly cancelling them from that.
You wish to reuse this infrastructure, of course! That's fine. To do so,
when the message is moved to the outbox, you would *also* submit it into
your mail queue. The copy in the outbox would be the representation in
JMAP land, not part of your mail queue. When the message is sent to the
next hop and can no longer be recalled, you then move the JMAP message
from outbox to sent, and remove the `\Draft` keyword.

Other systems may choose to implement it differently, not passing it to
the mail queue until the scheduled time is reached. As has been pointed
out already, many systems such as Gmail, FastMail etc. already have
infrastructure to do this kind of thing since it is also used for
deleting messages that are X days old from the trash, supporting snoozed
mail, etc.

The outbox protocol is agnostic to how you wish to implement this. Your
proposal constrains you to only the option *you* already have
implemented.

> * This makes it clear when the message enters the submission system.
>   There's no confusion as one has with an outbox model where a message
>   in the outbox may be submitted (if it's on the server) or maybe not
>   (if the client is offline when the message moves to the outbox).

This is clearly up to the client to distinguish, but I strongly disagree
this is a confusion. For the user, there is the outbox, which represents
the messages that are yet to be sent. If they open the outbox, I expect
most MUAs would label why they have not yet been sent (e.g. waiting for
internet connection, scheduled for time X).

> * Submission can have semantics fully compatible with existing
>   infrastructure, making this easier/faster to deploy.

As mentioned above, a lot of systems already have infrastructure for "do
action X in folder Y when time Z is reached", or you can alternatively
use your SMTP-queue-scheduled-send to implement the outbox model, so
this is actually *more* compatible with existing infrastructure than
your proposal.

> * The "outbox" model constrains unsend to only work if the message is
>   in the outbox. This model has no such constraint and works the same
>   regardless of where a message that can be "unsent" lives in the
>   infrastructure.

When composing and sending a message, it goes through 2 or 3 states.
These need to be represented in the mail store (and thus the protocol)
so that users can understand what is going on, and what actions are
available to them.

Two of these we (I believe) agree on, since they are from IMAP:

(1) The message is still being composed. It SHOULD be in the
    "drafts" mailbox and MUST have the "\Draft" keyword. This is the
    same as IMAP.
(2) The message has been sent, cannot be recalled. It SHOULD be in the
    "sent" mailbox (although services may provide means for users to ask
    it to go somewhere else, for example we have a few users that prefer
    their sent mail to in the same mailbox as the message they were
    replying to).

The third (new) state is for "scheduled" messages. We have two options
for how this is represented:

1. By its presence in the "outbox". Moving it out is therefore the
   logical thing to unschedule it.

2. By a keyword. This permits it to be in any mailbox, although we would
   probably add an outbox mailbox to our server for holding these
   messages by default. Removing the keyword would probably be a logical
   way to unschedule it. This option is quite a bit less efficient at
   the protocol level, as without a Mailbox object (which has a
   precalculated total count), the client will have to issue a search
   every single time there's a state change to see if there are any
   scheduled messages.

I'm presuming you are not advocating for option (3), which is no
representation in the mail store, since this would be terrible for the
user experience, and your proposal explicitly said "Add a way to
search/select messages in the Sent folder that may be possible to
unsend", which would indicate there must be some kind of state
representing this status.

So however you implement it, you need to trigger some state change on
the JMAP server for each logical step so that clients can represent
this, and update its local model as changes occur. The choice of
representation is mainly down to what will map more easily to how
clients wish to represent the set of scheduled messagese to users.

UX designers seem to have overwhelmingly decided that putting these
scheduled messages in an outbox rather than mixing them in with sent
items or elsewhere is a clearer model for users to understand. I
provided 5 example products in the previous email that do this, but if
that's insufficient I noice we have representatives from Apple, Google
and AOL on this list; perhaps they can ask their respective UI teams to
comment on what they would recommend?

Neil.