Re: [Extra] I-D Action: draft-ietf-extra-sieve-special-use-01.txt

Bron Gondwana <brong@fastmailteam.com> Tue, 17 July 2018 21:39 UTC

Return-Path: <brong@fastmailteam.com>
X-Original-To: extra@ietfa.amsl.com
Delivered-To: extra@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DD04F130E2C for <extra@ietfa.amsl.com>; Tue, 17 Jul 2018 14:39:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmailteam.com header.b=xPR14le/; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=FgRfDQ0N
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 C-S4VkE88xd4 for <extra@ietfa.amsl.com>; Tue, 17 Jul 2018 14:39:18 -0700 (PDT)
Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4028D129C6B for <extra@ietf.org>; Tue, 17 Jul 2018 14:39:18 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id C48BE300 for <extra@ietf.org>; Tue, 17 Jul 2018 17:39:17 -0400 (EDT)
Received: from web1 ([10.202.2.211]) by compute6.internal (MEProxy); Tue, 17 Jul 2018 17:39:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm3; bh=2y3GljV6LyWqIQXlG fVneCAdALf6TsN5M/PoqOjJXh0=; b=xPR14le/KAILc7LtRDahaSPQGkZ/WoTux Hi72CW1MQXH2IX8wUwXDpQN5wlFsOoibYzbAbUJfG4My25B5E6jt9hgJkL7/9O3s jfy4My5wSMOfJn3DfPCGuhxFWIGzrvsVhqn81lGlUI7OZ8q2GY+iVDIV35MrBy7k V1NgCIfCAri0y57+Lw++EOmBe789q74sH1REPRgnvUmR7qbJL9KLA7T4xs5ZKwlI 7CK1sDZYZkEJZ93R3oxIOfLFAKO8QLXwqeRA8NwsbTF987td6A010ljSRPRbQfV6 V19ep91XbbGql3/MRJq2iK2uMHZlPHFkllYg5+tRzMiM90TdT58Nw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm3; bh=2y3Glj V6LyWqIQXlGfVneCAdALf6TsN5M/PoqOjJXh0=; b=FgRfDQ0NQigTI21h5HSgjW mSuZAXLKYmjIsTCJlLNWwO1xBPRQ1dA36nf27wHzcRyby9+SXTpMGyh66Z8zfabe OE6TaxKvzz1znF4e/QXKsgL9LCd4wTcO9epuOHfSUzR2GuMnSrYqORsjFmNPq3Kl rQwzPIEECE69Ft569h4PA3H8fkbChZcUG2xmUeiD3OcFE7VCjwe+SKuIcfiPCqJk 0qrNQ3Hn5HYlYZCzqPJluDA5wk8Id5ePYWOZ6bxc8w7sTRkF5TvPJ3fAs//7X3D7 HwummatOm9kQNODEOppmTBaycbrL5mQQTFsUJLP+UXRvLhVPhq2eLN1iXlkLGVNQ ==
X-ME-Proxy: <xmx:BWJOW-X9jlA4Kh3vYFs998kTiF2ImOWh53ED8JPje7x28kUcLGD6xg> <xmx:BWJOW2Trs1RxmygFQxKwrpojCSXxhx6Huo4C1ZTtC1lsl_ErV4d88Q> <xmx:BWJOW-D2snJsD3xfx7LgaCjZPImtxKnqWPgKxxEyslBdO4iNxzD3EQ> <xmx:BWJOWxe85GWcuJcHbiqiNkAbF8GG08My0W2sm3xyU9rfgdEb58Zhaw> <xmx:BWJOW-4tTdyrCeS4_bxk3p4K6bf2e0VrnoXvX-jEyUOH1xQyYAKDRA> <xmx:BWJOW2UX1cDnjZYcP4Z9SdbNNdbz8QSPFX6ye9NvqPR-YkQm9EvXWA>
X-ME-Sender: <xms:BGJOWzYH8ZrkP67Lv-jvzRrHexzXKjzk02oOWaYQAukmaWQD1z-rFA>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id DBFBD94138; Tue, 17 Jul 2018 17:39:16 -0400 (EDT)
Message-Id: <1531863556.2753802.1444123408.6D6E6340@webmail.messagingengine.com>
From: Bron Gondwana <brong@fastmailteam.com>
To: extra@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_153186355627538020"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-957169fa
References: <151533655607.10858.793231788332492256@ietfa.amsl.com> <ce56fc8f-366a-8e1e-2f00-1ed22da28d15@dovecot.fi> <01QNLYA7BLVQ000051@mauve.mrochek.com> <83ddcadc-b756-91c1-3664-81955cd8f0d8@dovecot.fi> <01QTO3THVZ5I00AI1F@mauve.mrochek.com>
Date: Wed, 18 Jul 2018 07:39:16 +1000
In-Reply-To: <01QTO3THVZ5I00AI1F@mauve.mrochek.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/extra/QYDWB2q6xOuamo5-HwQ3Q0Rsuc0>
Subject: Re: [Extra] I-D Action: draft-ietf-extra-sieve-special-use-01.txt
X-BeenThere: extra@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Email mailstore and eXtensions To Revise or Amend <extra.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/extra>, <mailto:extra-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/extra/>
List-Post: <mailto:extra@ietf.org>
List-Help: <mailto:extra-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/extra>, <mailto:extra-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Jul 2018 21:39:22 -0000

Hi all, sorry about dropping the ball on following up on this.  I'm just
putting together the slides for Thursday now.
On Thu, Jun 14, 2018, at 01:40, Ned Freed wrote:
>>> This, incidentially, is one of those places where providing the
>>> actual IMAP>>> commands will be especially valuable: Pointing out that you should
>>> use the>>> NAMESPACE extension and if it isn't present, fallback to LIST ""
>>> would be very>>> helpful.
> 
>> Here's my initial attempt at addressing this point (separate
>> branch in>> Github):
> 
>> https://github.com/ietfextra/draft-ietf-extra-sieve-special-use/commit/035a1af6137a383089c8d54cd733238dc2dfebda> 
>> This adds an IMAP example for specialuse_exists.
> 
>> What do you think?
> 
> The first step seems fine:
> 
>   C: A01 NAMESPACE
>   S: * NAMESPACE (("INBOX/" "/")("Archive/" "/")) NIL (("Public/"
>      "/"))>   S: A01 OK NAMESPACE command completed
> 
> In the next step:
> 
>     Subsequently, when no particular mailbox is of interest (i.e., the>     "specialuse_exists" test has no mailbox argument), the client
>     lists>     all mailboxes with special-use flags in the two returned personal>     namespaces:
> 
>     C: A02 LIST (SPECIAL-USE) "" ("INBOX/*" "Archive/*") RETURN (SPECIAL-
>        USE)>     S: * LIST (\Drafts) "/" INBOX/Drafts
>     S: * LIST (\Trash) "/" INBOX/Trash
>     S: * LIST (\Sent) "/" INBOX/Sent
>     S: * LIST (\Archive) "/" Archive/Default
> 
> It should be noted that this depends on extended list being available.> 
> The final step is:
> 
>     C: A03 SELECT Archive/Default
>     S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
>     S: * OK [PERMANENTFLAGS (\Answered \Deleted \Seen \Draft \*)]
>        Flags permitted.>     S: * 11211 EXISTS
>     S: * 3 RECENT
>     S: * OK [UIDVALIDITY 1526903163] UIDs valid
>     S: * OK [UIDNEXT 11278] Predicted next UID
>     S: A03 OK [READ-WRITE] SELECT command completed
> 
> There are several issues here.
> 
> First, if you're going to use SELECT it's probably worth noting
> that since> inclusion of [READ-WRITE] for writable mailboxes is a SHOULD in RFC
> 3501 while> inclusion of [READ-ONLY] for non-writable is a MUST, a writability
> check really> needs to based on the absence of [READ-ONLY]. (RFC 5490 3.1.a appears
> incorrect> to me in this regard - should I file an errata?)
> 
> However, I think use of SELECT for this purpose is problematic: It's
> potentially expensive and worse, may cause undesireable state
> changes. Why> not use the MYRIGHTS command to obtain the access rights (and check
> for "p" or> "i") without having to select the mailbox?
> 
> And as a bonus, if it's available you could use the just-standardized> LIST-MYRIGHTS extension to piggyback getting the rights while getting
> the list> of special-use mailboxes.
> 
> More generally, this is why documenting the things necessary to
> implement the> necessary semantics of an extension is helpful - there may be
> optimizations and> concerns that should be called out lest implementors miss them.
> 
> It also helps clarify overall implementation difficulty. And
> while this> extension may be easy to implement in the Sieve-in-IMAP case, from the> perspective of an MTA/MDA implementation, even if all of the steps
> can be done> efficiently, there's still the question of IMAP server
> availability and the> handling of temporary errors.
> 
> All of which is roundabout way of saying I now think that we
> may want a> capability for specialuse_exists that's separate from
> "special-use"/:specialuse. Or better still, since we already have the
> "mailbox"> capability for "mailbox access stuff", I think we should require the
> presence> of both "mailbox" and "special-use" capabilities in order to use
> specialuse_exists.

Stephan, are you happy to revise based on Ned's feedback above?

> I also reviewed the rest of the revised draft, and it's looking
> good. My one> remaining concern is with the handling of multiple mailboxes
> having the> same special-use flag assigned. The draft currently says:
> 
>   More than one mailbox in the user's personal namespace can have a
>   particular special-use flag assigned.  In case of such
>   ambiguity, the>   mailbox that is chosen for delivery is implementation-defined.
>   However, while the set of mailboxes to which the involved special-
>   use>   flags are assigned remains unchanged, implementations MUST ensure
>   that the mailbox choice is made consistently, so that the same
>   mailbox is used every time.  Conversely, the chosen mailbox MAY
>   change once the special-use flag assignments that are relevant for
>   the mailbox choice are changed (usually by user interaction).
> 
> I don't see a way I can reasonably implement this MUST via IMAP
> unless the> IMAP server always returns the list of special-use mailboxes in the
> same order.> Sure, I can cache the user/special-use-attribute/actual-mailbox-
> list tuple> somewhere, but caches can always be lost. And mailbox metadata is (a)> Potentially much too expensive and (b) Subject to the
> vagarities of user> actions.
> 
> I'm not happy about it, but I think this needs to become a SHOULD.

I can live with SHOULD for cases where there are multiple mailboxes with
the same special-use.
> Another possibility is to use the default mailbox name as a means of
> disambiguating multiple mailboxes with the same special-use attribute:> If the default mailbox is one of these deliver to it preferentially,
> otherwise the behavior is implementation-defined. Not perfect, but it> provides a bit more consistent behavior that's easily achievable.
> 
> Aside from these issues, this draft looks good to go to me.

Thanks for the great feedback!

Cheers,

Bron.

--
  Bron Gondwana, CEO, FastMail Pty Ltd
  brong@fastmailteam.com