Re: [Jmap] Another question about updating a draft Email

Neil Jenkins <neilj@fastmailteam.com> Tue, 16 November 2021 02:35 UTC

Return-Path: <neilj@fastmailteam.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 A40343A043C for <jmap@ietfa.amsl.com>; Mon, 15 Nov 2021 18:35:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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=aE8A+PBe; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=ZZ1z88HI
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 mKlb0APj__Vq for <jmap@ietfa.amsl.com>; Mon, 15 Nov 2021 18:35:09 -0800 (PST)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 994213A041B for <jmap@ietf.org>; Mon, 15 Nov 2021 18:35:09 -0800 (PST)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A80695C029D for <jmap@ietf.org>; Mon, 15 Nov 2021 21:35:08 -0500 (EST)
Received: from imap43 ([10.202.2.93]) by compute5.internal (MEProxy); Mon, 15 Nov 2021 21:35:08 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type; s=fm1; bh=PAeDzb6 1HMbXGaUhh1DELsvUfoaWiDEYaeJ+0qOJHaU=; b=aE8A+PBe/XkrSis63jWJVbN D1sdg/l56/ZvrVt27arjKJFAz6RuKFFSHcBdeUqcwC1SK5cwPvBBLUhEJmXnF/Dl WQTcm3N0i/zDP8eLpv9ySNDpUUzVrBu6SQ/0Tt+kapwww1VlII20TrF6ZEz0QutM fAShxxkdN5uWmBhIN1sXYnSuZ09491SHyNcihkJkDmWkr5ottUPe2weKvCMtBjvL jrMvHJKw9lH3S/+/zDHm+Vp+rwqgMUeeMeBgYJzqbsJyx78AzwKVTw2AM8J9u4hn xaQxvabzTbBMTM7GHnD4IDOsiYhbylXnalblfBbbYg/OdFD8RYRkDXKgvZ5IeHQ= =
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=PAeDzb 61HMbXGaUhh1DELsvUfoaWiDEYaeJ+0qOJHaU=; b=ZZ1z88HIz/nZnf8AFRCAa7 mmpgXJD9k7PDF3/wA8aTlp7Y7fijpXXJJb0s5wH6w/3qwg6kwiTrVKG1sRVHAvUf uVTRa9bFzRcJZx2132m9ww83YWU2A70S5PIKw7gBaWQNfNW8/f+DtM6tQruNlpJd KAoquFYrWCArVf3JmFJd4vA7JfFV2C0WiJfSNgtGvYQ8h3mT++Pu+jo4Keu07YHe 2WRkCChBKPF6txeexw9BYXOIsTC8fO0P5B46GIpLsZJHSJ8+Y84nS1VWoLkgbIaC VfDvHuLJxWjKu16IWdR2DSPgEVfvubxoLkxAymc9tjQYi2O0DxUFoQkIiXjgn80g ==
X-ME-Sender: <xms:3BiTYVrVQ4kH6MvZegtuBi9JFCeJlUUUjQQg_HavLEp8BzkjeUHNOg> <xme:3BiTYXrPfmZi_mcXp2vmX38Jo6s-YnLrB6cBCOAb9-Z7V67Mrrq6Vbi-ow-0SPpLY Ii5NCiBg7mt6Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrfedugdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsegrtderreerreejnecuhfhrohhmpedfpfgvihhl ucflvghnkhhinhhsfdcuoehnvghilhhjsehfrghsthhmrghilhhtvggrmhdrtghomheqne cuggftrfgrthhtvghrnhepheeuhfdujedtieevkedvhfffgfelfeelhfefkeehhfekleek hfefueefveffjeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepnhgvihhljhesfhgrshhtmhgrihhlthgvrghmrdgtohhm
X-ME-Proxy: <xmx:3BiTYSNLPppw4CFSaSnUEkUN0JoisP4LK40DCofOCGCR1-gdIC9Mvw> <xmx:3BiTYQ7cLod5Dg1GP6tiWVGl0OLj_A1bYYrWjpd6ky-fHpvXvkKm3w> <xmx:3BiTYU4K1OUJW0S7drRcK8LnkSsxtp9rOjErYvh1MBj3480eZLII2w> <xmx:3BiTYWHRkxt1phzJmFzWYxb285TXhGyHXGdKPjjd5AHG8WJ9UdXLhQ>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5D306AC0DD1; Mon, 15 Nov 2021 21:35:08 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-1457-g307304a2db-fm-20211109.001-g307304a2
Mime-Version: 1.0
Message-Id: <f3bff111-59af-46df-9c1d-91cbdc79827c@dogfood.fastmail.com>
In-Reply-To: <41cf1339-3a65-d638-5056-927a69a59045@mildred.fr>
References: <41cf1339-3a65-d638-5056-927a69a59045@mildred.fr>
Date: Tue, 16 Nov 2021 13:35:07 +1100
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="f9c639aa3bd24809ba8cb69125d16dfe"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/A9kXznGqOipW2Ujj94W6zce25-s>
Subject: Re: [Jmap] Another question about updating a draft Email
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 16 Nov 2021 02:35:15 -0000

If you fetch the `headers` property you'll get a list of all headers in the email (unparsed). You should be able to use that in the `Email/set` to get the create a message with the sam set of headers (or you could modify some first). Similarly the `bodyStructure` property to clone the existing body structure. Then it's just a matter of including the metadata properties to put it in the mailbox(es) you want/set any keywords.

—Neil