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

"Chris Newman" <chris.newman@oracle.com> Wed, 26 April 2017 17:54 UTC

Return-Path: <chris.newman@oracle.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 3A5751296B3 for <jmap@ietfa.amsl.com>; Wed, 26 Apr 2017 10:54:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.202
X-Spam-Level:
X-Spam-Status: No, score=-4.202 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 mXcmLCFMqWQS for <jmap@ietfa.amsl.com>; Wed, 26 Apr 2017 10:54:18 -0700 (PDT)
Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 135E1124BE8 for <jmap@ietf.org>; Wed, 26 Apr 2017 10:54:18 -0700 (PDT)
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3QHsEb2020927 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Apr 2017 17:54:15 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v3QHsEKp030455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Apr 2017 17:54:14 GMT
Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v3QHsDOL022998; Wed, 26 Apr 2017 17:54:14 GMT
Received: from [10.145.239.185] (/10.145.239.185) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 26 Apr 2017 10:54:13 -0700
From: Chris Newman <chris.newman@oracle.com>
To: Bron Gondwana <brong@fastmail.fm>
Cc: jmap@ietf.org
Date: Wed, 26 Apr 2017 10:54:11 -0700
Message-ID: <B2FD4698-E783-4D15-BA4E-B637A070E6A9@oracle.com>
In-Reply-To: <1493185260.709114.956477904.75CB343B@webmail.messagingengine.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>
MIME-Version: 1.0
Content-Type: text/plain; format="flowed"
X-Mailer: MailMate (1.9.6r5347)
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/ZiXC-x-lAchRc2tc8SfOK2L_QJg>
Subject: [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: Wed, 26 Apr 2017 17:54:19 -0000

On 25 Apr 2017, at 22:41, Bron Gondwana wrote:
>> I really want a fourth option for server implementation:
>>
>> 4. The mail store and mail queue are completely separate. The mail 
>> queue
>> daemon never accesses the mail store. The set of actions JMAP 
>> performs
>> on objects in the mail queue is limited to only those that are 
>> strictly
>> necessary to achieve a useful goal (envelope extensions like future
>> release at submission time, unsend for messages still in local queue,
>> and status feedback tagging on sent messages).
>
> You appear to be proposing one of:
>
> a) there is no support for delayed sending or undo
> b) the user has no visibility or control of queued messages after 
> submitting them
> c) the user can control queued messages, but needs to use a different 
> protocol than JMAP to do it
> d) a new object type for queued messages needs to be defined in JMAP, 
> with operations that allow achieving the above useful goals.
>
> If (d), are you willing to write up the object definitions and client 
> advice for how they would be used, so they can be tested?

I'll describe a model that achieves my goal (which is to provide the 
desired future release & unsend functionality without requiring the 
server to implement a storage model with combined mail store and mail 
queue semantics). I don't want to get bogged down in specification 
details yet.

Here's one way to accomplish my goal:

1. Get rid of the server-side outbox. We only have a drafts folder and a 
sent folder.

2. Add a submission command with envelope (same structure as SMTP 
envelope but JSON syntax and quoting). We pass this command a reference 
to a draft message in the drafts folder, and if the submission succeeds, 
the message is moved to the sent folder with the envelope as an 
annotation. The envelope can include the already-standard future release 
extension.

3. Add an unsend command which takes a reference to a message in the 
sent folder. If the unsend succeeds, the message can be moved back to 
the drafts folder as part of this action. How the server correlates a 
message in the sent folder with a message in the mail queue is an 
implementation detail; the spec need not specify that detail in order to 
provide the functionality with this model.

4. Add a way to search/select messages in the Sent folder that may be 
possible to unsend.

This model has a lot of advantages over the outbox model:

* 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.
* This does not unnecessarily constrain server implementation, and 
permits simpler server designs.
* This preserves clean mail store and mail queue separation including 
the security and operational benefits that provides.
* 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).
* Submission can have semantics fully compatible with existing 
infrastructure, making this easier/faster to deploy.
* 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.

		- Chris