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

Neil Jenkins <neilj@fastmail.com> Wed, 03 May 2017 08:00 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 1D024129C6B for <jmap@ietfa.amsl.com>; Wed, 3 May 2017 01:00:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.019
X-Spam-Level:
X-Spam-Status: No, score=-0.019 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=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=VkPXcR6i; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=rAdSZf+5
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 H3yJegEh3Lk8 for <jmap@ietfa.amsl.com>; Wed, 3 May 2017 01:00:05 -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 7950F12E03A for <jmap@ietf.org>; Wed, 3 May 2017 00:57:24 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id DE28020C21; Wed, 3 May 2017 03:57:23 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Wed, 03 May 2017 03:57:23 -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=xDoo6zysMsYCB9LprwCnmhLJ3G8Bg eT4uCXci6NTUKU=; b=VkPXcR6iff9kxjweDLgWBlvVJL56qbVYRvVmliERCbJQj 4HrRFwCr7tznxWOWFLHuvU89bglSxlBP6EHagPJQWADLIOYCtTnyLRfoTluLaBE6 cbw7SbBHUoYhxs2A0pqg8Jw4yN5/WfmvgFz9yUN0ODIjj/ZCVos4jGO4IDSs9DpT 7oP9BBGuFnUQrpNbSLtQNAdhjWEBm9VAXVfwY0NuXvgKXLinCCHIyJ6ffBpwKG25 3DNQZtgW1y115OPaSqG3z4dCwFDIL3YwR55zJgbQiZXQzUxQBrjhhpPLcyrYBw8b qlIknX5jB6D/JGMkJXfru3t9L1BvWqWKVJwp5GPgA==
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=xDoo6z ysMsYCB9LprwCnmhLJ3G8BgeT4uCXci6NTUKU=; b=rAdSZf+51wLAoGKbqKV5Dn pqIqpPd365RPBgVJ+MQ7nyO+FFPssjsaZvj5o4Y2La72O8vF366GmWZTYLdkl0HO NPl34ybvQk5c4aIQ/BCqYULkAggV/hni8xxQOZb8WxQc/2eoi/JibvnoPW15vxC4 Zm4Qh790UX7f6ZXOaQN1jU67+weOq7njyRN0imv7YK3kroqZgymjMgOg6AUZJJqw +HmQu0SSIgwgzHbxwNO0H4vfvGNSKeFvmAr0r9j2YOErrVhHCiC8Sr0MGOVICOR/ r2hyTWLslLEoSwIuJqhOE+e354LJneMn9YsFQYWW+9k+hhvgFNFl72Pq1L4khWFg ==
X-ME-Sender: <xms:Y40JWX2wGAmflFdyn8G8uiyZPKK4Tr2QiLKx0eODU5urQK5EVNKJzQ>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 9D4F9E264D; Wed, 3 May 2017 03:57:23 -0400 (EDT)
Message-Id: <1493798243.3361851.964066360.38B8043E@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: multipart/alternative; boundary="_----------=_149379824333618510"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-e94d03aa
In-Reply-To: <D5EC9370-049B-4DA8-B995-09C0ADDD0E2A@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> <1493358386.1136069.958999408.285D03F1@webmail.messagingengine.com> <D5EC9370-049B-4DA8-B995-09C0ADDD0E2A@oracle.com>
Date: Wed, 03 May 2017 07:57:23 +0000
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/RDzFyVBoNQsLMpTuzeanzbfTkT8>
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: Wed, 03 May 2017 08:00:11 -0000

On Mon, 1 May 2017, at 09:53 PM, Chris Newman wrote:
> Here's my guess at the root cause:
> * You're trying to mirror a particular client UI model in the mail
>   store server design.
I'm trying to ensure that the API exposes the data clients need to
present common UI patterns in an efficient way, while also allowing the
most flexibility in server implementation. I think we're both aiming for
the same thing!
> 1. I believe there are four message types involved in this discussion:>   * draft messages
>   * client-side outbox
>   * future release RFC 4865 submitted
>   * other submitted messages

I agree, although I don't think the client-side outbox is particularly
relevant to this discussion, as it should not affect the API design. I'm
sorry I brought this up as it side-tracked the discussion somewhat. My
main point was that many existing systems assign submitted "future
release" messages to a separate mailbox on the *server*, and clients
present them to the user distinctly to those that have been released.
What I misunderstood from your proposal, is that rather than marking
messages that can be recalled/cannot be recalled, you propose a
client just look at the "release date" annotation instead. Although
you also say this:
> Actually, my proposal makes this server design approach
> simpler. There's> just an internal flag in the sent folder to indicate if the
> message has> been passed forward. The mail queue daemon that operates on the mail
> store sent folder, can transfer the message to the next hop MTA and
> set> that flag at the future release time. No need to move the message
> between folders.

So the mail queue daemon *does* perform an action on the message in the
mail store when it is sent? I previously thought you were advocating for
a model where these can be completely separate and so this is not
possible. Could you please clarify?
I think we've got various issues conflated a bit over these discussions,
so I'll clarify what I think are the separate questions:
How, if at all, are "future release" messages (that have yet to be
released) marked over the API? Is there a change in the state when they
are released? I agree this may not correspond exactly with whether a
message can be unsent, especially for internal corporate mail systems,
so a related question is: how, if at all, are messages marked that can
be unsent? (This is potentially a tristate: can (almost) definitely
unsend, can definitely not unsend, may be able to unsend).
I think if we can agree on answers to these questions, the rest will
fall out fairly easily.
> 3. I view "submit" and "unsend" as MTA actions that should not be
> confused or conflated with mail store operations. I'm opposed to
> protocol designs where a message move, delete or flag changes triggers> MTA actions as a side-effect.
> Instead, I propose JMAP have explicit "submit" and "unsend" commands
> that first perform the MTA action but can> also trigger mail store actions (like move message or flag change) if
> the MTA action succeeds.
Yes, this is a perfectly fine approach; I'm not opposed to adding
explicit sendMessages/unsendMessages calls. If the call can optionally
set which mailbox(es)/keywords to set upon successful send, then this is
functionally equivalent.
> My proposal is to have future release sent messages tagged with their> future release date. The MUA can create a virtual folder for future
> release messages with a future date. Whether the server caches a count> for the messages in that virtual folder is a server design
> optimization> choice. If enough clients request that count that it helps server
> scalability to cache that count, then servers will cache that
> count. The> count of future release messages is thus not relevant to the
> issue under> debate.

What's relevant is how this count is exposed over the API. If there
is a mailbox, then the synchronisation of mailbox objects will ensure
the client is "pushed" the count; because count changes are common
and clients need to know them to present the most common UI paradigm
for mail, synchronisation of mailbox counts is optimised for in the
JMAP protocol.
One proposal that might satisfy everyone: an "outbox" or "futurerelease"
mailbox role is added (this is the IMAP SPECIAL-USE representation in
JMAP).  Servers can *optionally* have a mailbox with this role; if it
does, clients SHOULD place future-release messages in here, but like
"sent" *can* put the message in any mailbox(es). Servers that have this
mailbox MUST move messages from this mailbox to the sent mailbox at
future release time (which may just be based upon the future-release
date, or may be actually based on releasing it to the mail queue).
Neil.