[Extra] IMAP4rev2: how to signal canonical mailbox name after CREATE

Alexey Melnikov <alexey.melnikov@isode.com> Wed, 17 June 2020 11:00 UTC

Return-Path: <alexey.melnikov@isode.com>
X-Original-To: extra@ietfa.amsl.com
Delivered-To: extra@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id 0E01C3A095C for <extra@ietfa.amsl.com>; Wed, 17 Jun 2020 04:00:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=isode.com
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id pBpyO54VymtI for <extra@ietfa.amsl.com>; Wed, 17 Jun 2020 04:00:33 -0700 (PDT)
Received: from statler.isode.com (Statler.isode.com []) by ietfa.amsl.com (Postfix) with ESMTP id 3BE783A0942 for <extra@ietf.org>; Wed, 17 Jun 2020 04:00:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1592391632; d=isode.com; s=june2016; i=@isode.com; bh=OajWwuEQg2cDr7RYEi//sMqkjoXaCeUJV8ZgYvPmF/4=; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version: In-Reply-To:References:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description; b=WL79BvSnZaLCWO6cRSrY4iIg/V0xy1HEVRiF6uAklnG1yt6wZaV2KOcLS0sMCu/sfy2dQW EwcU3B2YQdGYbm1cvFj5dW/qv3fmLR8CRnto9TLk6wvoqjQE5AOTf8oFm/qk+4xx56tJRP BmHbM6W4F5l5T1e6NEnTuShEPRpXkYY=;
Received: from [] (host31-49-142-105.range31-49.btcentralplus.com []) by statler.isode.com (submission channel) via TCP with ESMTPSA id <Xun3zwBLOYaT@statler.isode.com>; Wed, 17 Jun 2020 12:00:31 +0100
From: Alexey Melnikov <alexey.melnikov@isode.com>
To: Timo Sirainen <timo@sirainen.com>, Bron Gondwana <brong@fastmailteam.com>
Cc: extra@ietf.org
References: <9fdfa8e8-147d-4248-a0c1-48de171ac675@dogfood.fastmail.com> <872422BE-C8FA-4AA0-8EF1-2ECA79F64926@sirainen.com> <96BAB7A5-420A-49AF-977F-1F722746E5DD@isode.com> <5FAA4D04-F1A8-4E23-B9F2-817EBAFF8021@sirainen.com>
Message-ID: <5fe122d9-5313-8be1-199e-075a61d1bb2a@isode.com>
Date: Wed, 17 Jun 2020 12:00:13 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
In-Reply-To: <5FAA4D04-F1A8-4E23-B9F2-817EBAFF8021@sirainen.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="------------FAE60FDE16F508AA2FC794E0"
Content-Language: en-GB
Archived-At: <https://mailarchive.ietf.org/arch/msg/extra/wLczn---YKHCaHJBEoWl-3jBSmI>
Subject: [Extra] IMAP4rev2: how to signal canonical mailbox name after CREATE
X-BeenThere: extra@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 17 Jun 2020 11:00:35 -0000

Hi Timo/Bron,

On 02/02/2020 15:16, Timo Sirainen wrote:

> On 1. Feb 2020, at 21.00, Alexey Melnikov <alexey.melnikov@isode.com 
> <mailto:alexey.melnikov@isode.com>> wrote:
>>>> It still doesn't mean that you can reliably tell the correct octets 
>>>> for the matching mailbox from the LIST response though :(
>>> Is it too late to add a new response code? Something like:
>>> * OK [CREATED] TAG "a123" NAME "Denormalized name"
>> Response codes are cheap and don’t break older clients, so I am happy 
>> to add one.
I agreed to this in principle, but now is the time to see if we can make 
this work ;-).
> I guess an optional reply which can send both the changed name and/or 
> mailboxid. Maybe something like:
> * OK [CREATED] TAG "a123" NAME "Denormalized name" MAILBOXID "123456"

In IMAP, the part after the response code "[CREATED]" is human readable 
and has no structure. Making it structured in general or making it 
structured for some responses and not others is going to be a major 
change in IMAP handling, so I don't think we should go there.

> Although I'm not sure if some part of it would be nicer inside 
> parenthesis.

Yes, that is my point above: it has to be inside [].

This would makes it something like:

* OK [CREATED TAG "a123" NAME "Denormalized name" MAILBOXID "123456"]

We can even drop some labels that provide no value, because the 
corresponding value is required:

* OK [CREATED  "a123" "Denormalized name" MAILBOXID "123456"]

So ABNF for the latter is going to be something like this:

   created = "CREATED" SP tag SP mailbox-quoted ["MAILBOXID" SP aquoted]

   aquoted = 1*ATOM-CHAR / quoted

   mailbox-quoted = "INBOX" / aquoted
                  ; Same as "mailbox", but without
                  ; allowing for "literal" string

And also add "created" as one of "resp-text-code" choices.

To elaborate on why I excluded "literal" string is because response 
codes are defines as:

   atom [SP 1<any TEXT-CHAR except "]">]

and TEXT-CHAR excludes CR and LF.

Best Regards,