--- 1/draft-ietf-jmap-mdn-13.txt 2020-07-27 01:14:19.311210483 -0700 +++ 2/draft-ietf-jmap-mdn-14.txt 2020-07-27 01:14:19.339211195 -0700 @@ -1,55 +1,41 @@ JMAP R. Ouazana, Ed. Internet-Draft Linagora -Intended status: Standards Track July 2, 2020 -Expires: January 3, 2021 +Intended status: Standards Track July 24, 2020 +Expires: January 25, 2021 Handling Message Disposition Notification with JMAP - draft-ietf-jmap-mdn-13 + draft-ietf-jmap-mdn-14 Abstract - JMAP (RFC8620 - JSON Meta Application Protocol) is a generic protocol - for synchronising data, such as mail, calendars or contacts, between - a client and a server. It is optimised for mobile and web - environments, and aims to provide a consistent interface to different - data types. - - JMAP for Mail (RFC8621 - The JSON Meta Application Protocol (JMAP) - for Mail) specifies a data model for synchronising email data with a - server using JMAP. Clients can use this to efficiently search, - access, organise, and send messages. - - MDN are defined in RFC8098 and are used as "read receipts", - "acknowledgements", or "receipt notifications". - - MDN have a specific format that must be parsed or generated. The - goal of this document is to specify a data model for handling MDN - messages with a server using JMAP. + This document specifies a data model for handling Message Disposition + Notifications (MDNs, RFC 8098) in the JSON Meta Application Protocol + (JMAP, RFCs 8620 and 8621). Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on January 3, 2021. + This Internet-Draft will expire on January 25, 2021. Copyright Notice Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -57,66 +43,65 @@ to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Notational conventions . . . . . . . . . . . . . . . . . 3 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 - 1.3. Addition to the capabilities object . . . . . . . . . . . 4 + 1.3. Addition to the capabilities object . . . . . . . . . . . 3 2. MDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1. MDN/send . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2. MDN/parse . . . . . . . . . . . . . . . . . . . . . . . . 7 3. Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 3.1. Sending an MDN for a received email . . . . . . . . . . . 8 - 3.2. Asking for MDN when sending an email . . . . . . . . . . 9 + 3.1. Sending an MDN for a received email message . . . . . . . 8 + 3.2. Asking for MDN when sending an email message . . . . . . 9 3.3. Parsing a received MDN . . . . . . . . . . . . . . . . . 10 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 4.1. JMAP Capability Registration for "mdn" . . . . . . . . . 11 4.2. JMAP Error Codes Registry . . . . . . . . . . . . . . . . 12 - 4.2.1. mdnAlreadySent . . . . . . . . . . . . . . . . . . . 12 5. Security considerations . . . . . . . . . . . . . . . . . . . 12 - 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 - 6.1. Normative References . . . . . . . . . . . . . . . . . . 12 - 6.2. Informative References . . . . . . . . . . . . . . . . . 13 + 6. Normative References . . . . . . . . . . . . . . . . . . . . 12 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 13 1. Introduction JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic protocol for synchronising data, such as mail, calendars or contacts, between a client and a server. It is optimised for mobile and web - environments, and aims to provide a consistent interface to different - data types. + environments, and provides a consistent interface to different data + types. JMAP for Mail ([RFC8621] - The JSON Meta Application Protocol (JMAP) for Mail) specifies a data model for synchronising email data with a server using JMAP. Clients can use this to efficiently search, access, organise, and send messages. - MDN are defined in [RFC8098] and are used as "read receipts", - "acknowledgements", or "receipt notifications". + Message Disposition Notifications (MDNs) are defined in [RFC8098] and + are used as "read receipts", "acknowledgements", or "receipt + notifications". - A client can have to deal with MDN in different ways: + A client can have to deal with MDNs in different ways: - 1. When receiving an email, an MDN can be sent to the sender. This - specification defines an MDN/send method to cover this case. + 1. When receiving an email message, an MDN can be sent to the + sender. This specification defines an MDN/send method to cover + this case. - 2. When sending an email, an MDN can be requested. This must be - done with the help of a header, and is already specified by - [RFC8098] and can already be handled by [RFC8621] this way. + 2. When sending an email message, an MDN can be requested. This + must be done with the help of a header, and is already specified + by [RFC8098] and can already be handled by [RFC8621] this way. 3. When receiving an MDN, the MDN could be related to an existing - sent mail. This is already covered by [RFC8621] in the - EmailSubmission object. Client might want to display detailed + sent message. This is already covered by [RFC8621] in the + EmailSubmission object. A client might want to display detailed information about a received MDN. This specification defines an MDN/parse method to cover this case. 1.1. Notational conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. @@ -127,44 +112,45 @@ document. Servers MUST support all properties specified for the new data types defined in this document. 1.2. Terminology The same terminology is used in this document as in the core JMAP specification. - Keywords being case insensitive in IMAP but JSON being case - sensitive, the "$mdnsent" keyword MUST always be used in lowercase. + Because keywords are case-insensitive in IMAP but case-sensitive in + JMAP, the "$mdnsent" keyword MUST always be used in lowercase. 1.3. Addition to the capabilities object Capabilities are announced as part of the standard JMAP Session - resource; see [RFC8620], section 2. + resource; see [RFC8620], section 2. This defines a new capability, + "urn:ietf:params:jmap:mdn". The capability "urn:ietf:params:jmap:mdn" being present in the "accountCapabilities" property of an account represents support for - the "MDN" data type, parsing MDN via the "MDN/parse" method, and + the "MDN" data type, parsing MDNs via the "MDN/parse" method, and creating and sending MDN messages via the "MDN/send" method. Servers that include the capability in one or more "accountCapabilities" properties MUST also include the property in the "capabilities" property. The value of this "urn:ietf:params:jmap:mdn" property is an empty object in the account's "accountCapabilities" property. 2. MDN An *MDN* object has the following properties: - o forEmailId: "Id|null" Email Id of the received email this MDN is + o forEmailId: "Id|null" Email Id of the received message this MDN is relative to. This property MUST NOT be null for "MDN/send", but may be null in the response from the "MDN/parse" method. o subject: "String|null" Subject used as "Subject" header for this MDN. o textBody: "String|null" Human readable part of the MDN, as plain text. o includeOriginalMessage: "Boolean" (default: false). If "true", @@ -222,31 +208,31 @@ The MDN/send method sends an [RFC5322] message from an MDN object. When calling this method the "using" property of the Request object MUST contain the capabilities "urn:ietf:params:jmap:mdn" and "urn:ietf:params:jmap:mail". The latter because of the implicit call to Email/set and the use of Identities, described below. The method takes the following arguments: o accountId: "Id" The id of the account to use. o identityId: "Id" The id of the Identity to associate with these - MDN. The server will use this identity to define the sender of - the MDN and to set the finalRecipient field. + MDNs. The server will use this identity to define the sender of + the MDNs and to set the finalRecipient field. o send: "Id[MDN]" A map of creation id (client specified) to MDN objects. o onSuccessUpdateEmail: "Id[PatchObject]|null" A map of id to an object containing properties to update on the Email object referenced by the "MDN/send" if the sending succeeds. This will - always be a backreference to the creation id (see example below in - Section 3.1). + always be a backward reference to the creation id (see example + below in Section 3.1). The response has the following arguments: o accountId: "Id" The id of the account used for the call. o sent: "Id[MDN]|null" A map of creation id to MDN containing any properties that were not set by the client. This includes any properties that were omitted by the client and thus set to a default by the server. This argument is null if no MDN objects were successfully sent. @@ -260,67 +246,68 @@ o notFound: The reference Email Id cannot be found, or has no valid "Disposition-Notification-To" header. o forbidden: MDN/send would violate an ACL or other permissions policy. o forbiddenFrom: The user is not allowed to use the given finalRecipient property. o overQuota: MDN/send would exceed a server-defined limit on the - number or total size of sent MDN. It could include limitations on - sent emails. + number or total size of sent MDNs. It could include limitations + on sent messages. o tooLarge: MDN/send would result in an MDN that exceeds a server- defined limit for the maximum size of an MDN, or more generally on - emails. + email message. - o rateLimit: Too many MDN or emails have been created recently, and - a server-defined rate limit has been reached. It may work if - tried again later. + o rateLimit: Too many MDNs or email messages have been created + recently, and a server-defined rate limit has been reached. It + may work if tried again later. o invalidProperties: The record given is invalid in some way. The following is a new SetError: o mdnAlreadySent: The message has the "$mdnsent" keyword already set. If the accountId or identityId given cannot be found, the method call is rejected with an "invalidArguments" error. The client SHOULD NOT issue an MDN/send request if the message has the "$mdnsent" keyword set. When sending the MDN, the server is in charge of generating the "originalRecipient", "finalRecipient" and "originalMessageId" fields according to the [RFC8098] specification. The client is expected to explicitly update each "Email" for which an "MDN/send" has been invoked in order to set the "$mdnsent" keyword on - these emails. To ensure that, the server MUST reject an "MDN/send" + these messages. To ensure that, the server MUST reject an "MDN/send" which does not result in setting the keyword "$mdnsent". Thus the server MUST check that the "onSuccessUpdateEmail" property of the method is correctly set to update this keyword. 2.2. MDN/parse This method allows a client to parse blobs as [RFC5322] messages to get MDN objects. This can be used to parse and get detailed information about blobs referenced in the "mdnBlobIds" of the - EmailSubmission object, or any email the client could expect to be an - MDN. + EmailSubmission object, or any email message the client could expect + to be an MDN. The "forEmailId" property can be null or missing if the - "originalMessageId" property is missing, not referencing an existing - email or if the server cannot efficiently calculate the related email - (for example if several emails get the same "Message-Id" header). + "originalMessageId" property is missing or does not refer to an + existing message, or if the server cannot efficiently calculate the + related message (for example, if several messages get the same + "Message-Id" header). The MDN/parse method takes the following arguments: o accountId: "Id" The id of the account to use. o blobIds: "Id[]" The ids of the blobs to parse. The response has the following arguments: o accountId: "Id" The id of the account used for the call. @@ -339,62 +326,62 @@ o requestTooLarge: The number of ids requested by the client exceeds the maximum number the server is willing to process in a single method call. o invalidArguments: If the accountId given cannot be found, the MDN parsing is rejected with an "invalidArguments" error. 3. Samples -3.1. Sending an MDN for a received email +3.1. Sending an MDN for a received email message A client can use the following request to send an MDN back to the sender: [[ "MDN/send", { "accountId": "ue150411c", "identityId": "I64588216", "send": { "k1546": { "forEmailId": "Md45b47b4877521042cec0938", "subject": "Read receipt for: World domination", "textBody": "This receipt shows that the email has been displayed on your recipient's computer. There is no guaranty it has been read or understood.", - "reportingUA": "linagora.com; OpenPaaS", + "reportingUA": "joes-pc.cs.example.com; Foomail 97.1", "disposition": { "actionMode": "manual-action", "sendingMode": "mdn-sent-manually", "type": "displayed" }, "extension": { "X-EXTENSION-EXAMPLE": "example.com" } } }, "onSuccessUpdateEmail": { "#k1546": { "keywords/$mdnsent": true } } }, "0" ]] - If the email id matches an existing email without the "$mdnsent" - keyword, the server can answer: + If the email id matches an existing email message without the + "$mdnsent" keyword, the server can answer: [[ "MDN/send", { "accountId": "ue150411c", "sent": { "k1546": { "finalRecipient": "rfc822; john@example.com", - "originalMessageId": "<1521557867.2614.0.camel@apache.org>" + "originalMessageId": "<199509192301.23456@example.org>" } } }, "0" ], [ "Email/set", { "accountId": "ue150411c", "oldState": "23", "newState": "42", "updated": { "Md45b47b4877521042cec0938": {} } @@ -406,21 +393,21 @@ [[ "MDN/send", { "accountId": "ue150411c", "notSent": { "k1546": { "type": "mdnAlreadySent", "description" : "$mdnsent keyword is already present" } } }, "0" ]] -3.2. Asking for MDN when sending an email +3.2. Asking for MDN when sending an email message This is done with the [RFC8621] "Email/set" "create" method. [[ "Email/set", { "accountId": "ue150411c", "create": { "k1546": { "mailboxIds": { "2ea1ca41b38e": true }, @@ -437,50 +424,50 @@ "email": "john@example.com" }], "header:Disposition-Notification-To:asText": "joe@example.com", "subject": "World domination", ... } } }, "0" ]] Note the specified "Disposition-Notification-To" header indicating - where to send MDN back (usually the sender of the email). + where to send MDN back (usually the sender of the message). 3.3. Parsing a received MDN The client issues a parse request: [[ "MDN/parse", { "accountId": "ue150411c", - "blobIds: [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] + "blobIds": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] }, "0" ]] The server responds: [[ "MDN/parse", { "accountId": "ue150411c", "parsed": { "0f9f65ab-dc7b-4146-850f-6e4881093965": { "forEmailId": "Md45b47b4877521042cec0938", "subject": "Read receipt for: World domination", "textBody": "This receipt shows that the email has been displayed on your recipient's computer. There is no guaranty it has been read or understood.", - "reportingUA": "linagora.com; OpenPaaS", + "reportingUA": "joes-pc.cs.example.com; Foomail 97.1", "disposition": { "actionMode": "manual-action", "sendingMode": "mdn-sent-manually", "type": "displayed" }, "finalRecipient": "rfc822; john@example.com", - "originalMessageId": "<1521557867.2614.0.camel@apache.org>" + "originalMessageId": "<199509192301.23456@example.org>" } } }, "0" ]] In case of a not found blobId, the server would respond: [[ "MDN/parse", { "accountId": "ue150411c", "notFound": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] }, "0" ]] @@ -503,83 +490,77 @@ Specification document: this document Intended use: common Change Controller: IETF Security and privacy considerations: this document, section 5. 4.2. JMAP Error Codes Registry - The following subsection register one new error code in the "JMAP - Error Codes" registry, as defined in [RFC8620]. - -4.2.1. mdnAlreadySent + This section registers one new error code in the "JMAP Error Codes" + registry, as defined in [RFC8620]. JMAP Error Code: mdnAlreadySent Intended use: common Change controller: IETF Reference: This document, Section 2.1 Description: The message has the "$mdnsent" keyword already set. The client MUST NOT try again to send an MDN for this message. 5. Security considerations The same considerations regarding MDN (see [RFC8098] and [RFC3503]) apply to this document. In order to enforce trust regarding the relation between the user - sending an email and the identity of this user, the server SHOULD - validate in conformance to the provided Identity that the user is - permitted to use the finalRecipient value and return a forbiddenFrom - error if not. - -6. References + sending an email message and the identity of this user, the server + SHOULD validate in conformance to the provided Identity that the user + is permitted to use the finalRecipient value and return a + forbiddenFrom error if not. -6.1. Normative References +6. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC3503] Melnikov, A., "Message Disposition Notification (MDN) profile for Internet Message Access Protocol (IMAP)", RFC 3503, DOI 10.17487/RFC3503, March 2003, . [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 10.17487/RFC5322, October 2008, . [RFC8098] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition Notification", STD 85, RFC 8098, DOI 10.17487/RFC8098, February 2017, . + [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC + 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, + May 2017, . + [RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 2019, . [RFC8621] Jenkins, N. and C. Newman, "The JSON Meta Application Protocol (JMAP) for Mail", RFC 8621, DOI 10.17487/RFC8621, August 2019, . -6.2. Informative References - - [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC - 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, - May 2017, . - Author's Address Raphael Ouazana (editor) Linagora 100 Terrasse Boieldieu - Tour Franklin Paris - La Defense CEDEX 92042 France Email: rouazana@linagora.com URI: https://www.linagora.com