--- 1/draft-ietf-jmap-mdn-06.txt 2020-03-18 11:13:13.960088127 -0700 +++ 2/draft-ietf-jmap-mdn-07.txt 2020-03-18 11:13:13.988088837 -0700 @@ -1,18 +1,18 @@ JMAP R. Ouazana, Ed. Internet-Draft Linagora -Intended status: Standards Track February 28, 2020 -Expires: August 31, 2020 +Intended status: Standards Track March 18, 2020 +Expires: September 19, 2020 Handling Message Disposition Notification with JMAP - draft-ietf-jmap-mdn-06 + draft-ietf-jmap-mdn-07 Abstract This document specifies a data model for handling [RFC8098] MDN messages with a server using JMAP. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. @@ -20,21 +20,21 @@ 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 August 31, 2020. + This Internet-Draft will expire on September 19, 2020. 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 @@ -107,20 +107,23 @@ 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. + 1.3. Addition to the capabilities object Capabilities are announced as part of the standard JMAP Session resource; see [RFC8620], section 2. Support for the "MDN" data type and the "MDN/parse" method are represented by the capability "urn:ietf:params:jmap:mdn" being present in the "capabilities" property. The capability "urn:ietf:params:jmap:mdn" being present in the "accountCapabilities" property of an account represents support for creating and sending @@ -130,21 +133,22 @@ The value of this "urn:ietf:params:jmap:mdn" property is an empty object in both the JMAP session "capabilities" property and an 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 - relative to. + relative to. This argument can only be null when the MDN object + is a server response for 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", the content of the original message will appear in the third component of the multipart/report generated for the MDN. See @@ -215,49 +219,52 @@ 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. o notSent: "Id[MDNError]|null" A map of the creation id to an MDNError object for each record that failed to be sent, or null if all successful. The following MDNError types are defined: - o mdnAlreadySent: The message has the "$MDNSent" keyword already + o mdnAlreadySent: The message has the "$mdnsent" keyword already set. + 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 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. 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. 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 invalidProperties: The record given is invalid in some way. The client SHOULD NOT issue an MDN/send request if the message has - the "$MDNSent" keyword set. + the "$mdnsent" keyword set. When sending the MDN, the server is in charge of generating the "originalRecipient", "finalRecipient" and "originalMessageId" fields accordingly to the [RFC8098] specification. After all items in the "MDN/send" invocation have been processed, a - single implicit "Email/set" call MUST be made to set the "$MDNSent" + single implicit "Email/set" call MUST be made to set the "$mdnsent" keyword on "Email" objects referenced by "MDN" objects that have been successfully created (see [RFC3503] for more details). The response to this MUST be returned after the "MDN/send" response. 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 @@ -312,54 +319,54 @@ "reportingUA": "linagora.com; OpenPaaS", "disposition": { "actionMode": "manual-action", "sendingMode": "MDN-sent-manually", "type": "displayed" } } } }, "0" ]] - If the email id matches an existing email without the "$MDNSent" + If the email id matches an existing email 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>" } } }, "0" ], [ "Email/set", { "accountId": "ue150411c", "oldState": "23", "newState": "42", "updated": { "Md45b47b4877521042cec0938": { "keywords": { - "$MDNSent": true + "$mdnsent": true } } } }, "0" ]] - If the "$MDNSent" keyword has already been set, the server can answer + If the "$mdnsent" keyword has already been set, the server can answer an error: [[ "MDN/send", { "accountId": "ue150411c", "notSent": { "k1546": { "type": "mdnAlreadySent", - "description" : "$MDNSent keyword is already present" + "description" : "$mdnsent keyword is already present" } } }, "0" ]] 3.2. Asking for MDN when sending an email This is done with the [RFC8621] "Email/set" "create" method. [[ "Email/set", { "accountId": "ue150411c", @@ -460,21 +467,21 @@ 4.2.1. mdnAlreadySent 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 + 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. 6. References 6.1. Normative References