idnits 2.17.1 draft-ietf-jmap-mdn-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC8098]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 26, 2020) is 1513 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) No issues found here. Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 JMAP R. Ouazana, Ed. 3 Internet-Draft Linagora 4 Intended status: Standards Track February 26, 2020 5 Expires: August 29, 2020 7 Handling Message Disposition Notification with JMAP 8 draft-ietf-jmap-mdn-05 10 Abstract 12 This document specifies a data model for handling [RFC8098] MDN 13 messages with a server using JMAP. 15 Status of This Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at https://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on August 29, 2020. 32 Copyright Notice 34 Copyright (c) 2020 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (https://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 50 1.1. Notational conventions . . . . . . . . . . . . . . . . . 3 51 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 52 1.3. Addition to the capabilities object . . . . . . . . . . . 3 53 2. MDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 2.1. MDN/send . . . . . . . . . . . . . . . . . . . . . . . . 5 55 2.2. MDN/parse . . . . . . . . . . . . . . . . . . . . . . . . 6 56 3. Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 57 3.1. Sending an MDN for a received email . . . . . . . . . . . 7 58 3.2. Asking for MDN when sending an email . . . . . . . . . . 8 59 3.3. Parsing a received MDN . . . . . . . . . . . . . . . . . 9 60 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 61 4.1. JMAP Capability Registration for "mdn" . . . . . . . . . 10 62 4.2. JMAP Error Codes Registry . . . . . . . . . . . . . . . . 11 63 4.2.1. mdnAlreadySent . . . . . . . . . . . . . . . . . . . 11 64 5. Security considerations . . . . . . . . . . . . . . . . . . . 11 65 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 66 6.1. Normative References . . . . . . . . . . . . . . . . . . 11 67 6.2. Informative References . . . . . . . . . . . . . . . . . 12 68 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 12 70 1. Introduction 72 JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic 73 protocol for synchronising data, such as mail, calendars or contacts, 74 between a client and a server. It is optimised for mobile and web 75 environments, and aims to provide a consistent interface to different 76 data types. 78 MDN are defined in [RFC8098] and are used as "read receipts", 79 "acknowledgements", or "receipt notifications". 81 A client can have to deal with MDN in different ways: 83 1. When receiving an email, an MDN can be sent to the sender. This 84 specification defines an MDN/send method to cover this case. 86 2. When sending an email, an MDN can be requested. This must be 87 done with the help of a header, and is already specified by 88 [RFC8098] and can already be handled by [RFC8621] this way. 90 3. When receiving an MDN, the MDN could be related to an existing 91 sent mail. This is already covered by [RFC8621] in the 92 EmailSubmission object. Client could want to display detailed 93 information about a received MDN. This specification defines an 94 MDN/parse method to cover this case. 96 1.1. Notational conventions 98 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 99 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 100 "OPTIONAL" in this document are to be interpreted as described in BCP 101 14 [RFC2119] [RFC8174] when, and only when, they appear in all 102 capitals, as shown here. 104 Type signatures, examples and property descriptions in this document 105 follow the conventions established in section 1.1 of [RFC8620]. Data 106 types defined in the core specification are also used in this 107 document. 109 Servers MUST support all properties specified for the new data types 110 defined in this document. 112 1.2. Terminology 114 The same terminology is used in this document as in the core JMAP 115 specification. 117 1.3. Addition to the capabilities object 119 Capabilities are announced as part of the standard JMAP Session 120 resource; see [RFC8620], section 2. 122 Support for the "MDN" data type and the "MDN/parse" method are 123 represented by the capability "urn:ietf:params:jmap:mdn" being 124 present in the "capabilities" property. The capability 125 "urn:ietf:params:jmap:mdn" being present in the "accountCapabilities" 126 property of an account represents support for creating and sending 127 MDN messages via the "MDN/send" method. Servers that include the 128 capability in one or more "accountCapabilities" properties MUST also 129 include the property in the "capabilities" property. 131 The value of this "urn:ietf:params:jmap:mdn" property is an empty 132 object in both the JMAP session "capabilities" property and an 133 account's "accountCapabilities" property. 135 2. MDN 137 An *MDN* object has the following properties: 139 o forEmailId: "Id|null" Email Id of the received email this MDN is 140 relative to. 142 o subject: "String|null" Subject used as "Subject" header for this 143 MDN. 145 o textBody: "String|null" Human readable part of the MDN, as plain 146 text. 148 o reportingUA: "String|null" Name of the MUA creating this MDN. It 149 is used to build the MDN Report part of the MDN. 151 o disposition: "Disposition" Object containing the diverse MDN 152 disposition options. 154 o mdnGateway: "String|null" (server-set) Name of the gateway or MTA 155 that translated a foreign (non-Internet) message disposition 156 notification into this MDN. 158 o originalRecipient: "String|null" (server-set) Original recipient 159 address as specified by the sender of the message for which the 160 MDN is being issued. 162 o finalRecipient: "String" (server-set) Recipient for which the MDN 163 is being issued. 165 o originalMessageId: "String|null" (server-set) Message-ID (the 166 [RFC5322] header field, not the JMAP Id) of the message for which 167 the MDN is being issued. 169 o error: "String[]|null" (server-set) Additional information in the 170 form of text messages when the "error" disposition modifier 171 appears. 173 o extensionFields: "String[String]|null" (server-set) Object where 174 keys are extension-field names and values are extension-field 175 values. 177 A *Disposition* object has the following properties: 179 o actionMode: "String" This MUST be one of the following strings: 180 "manual-action" / "automatic-action" 182 o sendingMode: "String" This MUST be one of the following strings: 183 "MDN-sent-manually" / "MDN-sent-automatically" 185 o type: "String" This MUST be one of the following strings: 186 "deleted" / "dispatched" / "displayed" / "processed" 188 See [RFC8098] for the exact meaning of these different fields. 190 2.1. MDN/send 192 The MDN/send method sends an [RFC5322] message from an MDN object. 193 The capability "urn:ietf:params:jmap:mail" is implicitely required 194 while using this method. The method takes the following arguments: 196 o accountId: "Id" The id of the account to use. 198 o send: "Id[MDN]" A map of creation id (client specified) to MDN 199 objects. 201 The response has the following arguments: 203 o accountId: "Id" The id of the account used for the call. 205 o sent: "Id[MDN]|null" A map of creation id to MDN containing any 206 properties that were not sent by the client. This includes any 207 properties that were omitted by the client and thus set to a 208 default by the server. This argument is null if no MDN objects 209 were successfully sent. 211 o notSent: "Id[MDNError]|null" A map of the creation id to an 212 MDNError object for each record that failed to be sent, or null if 213 all successful. 215 The following MDNError types are defined: 217 o mdnAlreadySent: The message has the "$MDNSent" keyword already 218 set. 220 o forbidden: MDN/send would violate an ACL or other permissions 221 policy. 223 o overQuota: MDN/send would exceed a server-defined limit on the 224 number or total size of sent MDN. It could include limitations on 225 sent emails. 227 o tooLarge: MDN/send would result in an MDN that exceeds a server- 228 defined limit for the maximum size of an MDN, or more generally on 229 emails. 231 o rateLimit: Too many MDN or emails have been created recently, and 232 a server-defined rate limit has been reached. It may work if 233 tried again later. 235 o invalidProperties: The record given is invalid in some way. 237 The client SHOULD NOT issue an MDN/send request if the message has 238 the "$MDNSent" keyword set. 240 When sending the MDN, the server is in charge of generating the 241 "originalRecipient", "finalRecipient" and "originalMessageId" fields 242 accordingly to the [RFC8098] specification. 244 After all items in the "MDN/send" invocation have been processed, a 245 single implicit "Email/set" call MUST be made to set the "$MDNSent" 246 keyword on "Email" objects referenced by "MDN" objects that have been 247 successfully created (see [RFC3503] for more details). The response 248 to this MUST be returned after the "MDN/send" response. 250 2.2. MDN/parse 252 This method allows a client to parse blobs as [RFC5322] messages to 253 get MDN objects. This can be used to parse and get detailed 254 information about blobs referenced in the "mdnBlobIds" of the 255 EmailSubmission object, or any email the client could expect to be an 256 MDN. 258 The "forEmailId" property can be null or missing if the 259 "originalMessageId" property is missing or not referencing an 260 existing email. 262 The MDN/parse method takes the following arguments: 264 o accountId: "Id" The id of the account to use. 266 o blobIds: "Id[]" The ids of the blobs to parse. 268 The response has the following arguments: 270 o accountId: "Id" The id of the account used for the call. 272 o parsed: "Id[MDN]|null" A map of blob id to parsed MDN 273 representation for each successfully parsed blob, or null if none. 275 o notParsable: "Id[]|null" A list of ids given that corresponded to 276 blobs that could not be parsed as MDNs, or null if none. 278 o notFound: "Id[]|null" A list of blob ids given that could not be 279 found, or null if none. 281 The following additional error may be returned instead of the MDN/ 282 parse response: 284 o requestTooLarge: The number of ids requested by the client exceeds 285 the maximum number the server is willing to process in a single 286 method call. 288 3. Samples 290 3.1. Sending an MDN for a received email 292 A client can use the following request to send an MDN back to the 293 sender: 295 [[ "MDN/send", { 296 "accountId": "ue150411c", 297 "send": { 298 "k1546": { 299 "forEmailId": "Md45b47b4877521042cec0938", 300 "subject": "Read receipt for: World domination", 301 "textBody": "This receipt shows that the email has been 302 displayed on your recipient's computer. There is no 303 guaranty it has been read or understood.", 304 "reportingUA": "linagora.com; OpenPaaS", 305 "disposition": { 306 "actionMode": "manual-action", 307 "sendingMode": "MDN-sent-manually", 308 "type": "displayed" 309 } 310 } 311 } 312 }, "0" ]] 314 If the email id matches an existing email without the "$MDNSent" 315 keyword, the server can answer: 317 [[ "MDN/send", { 318 "accountId": "ue150411c", 319 "sent": { 320 "k1546": { 321 "finalRecipient": "rfc822; john@example.com", 322 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 323 } 324 } 325 }, "0" ], 326 [ "Email/set", { 327 "accountId": "ue150411c", 328 "oldState": "23", 329 "newState": "42", 330 "updated": { 331 "Md45b47b4877521042cec0938": { 332 "keywords": { 333 "$MDNSent": true 334 } 335 } 336 } 337 }, "0" ]] 339 If the "$MDNSent" keyword has already been set, the server can answer 340 an error: 342 [[ "MDN/send", { 343 "accountId": "ue150411c", 344 "notSent": { 345 "k1546": { 346 "type": "mdnAlreadySent", 347 "description" : "$MDNSent keyword is already present" 348 } 349 } 350 }, "0" ]] 352 3.2. Asking for MDN when sending an email 354 This is done with the [RFC8621] "Email/set" "create" method. 356 [[ "Email/set", { 357 "accountId": "ue150411c", 358 "create": { 359 "k1546": { 360 "mailboxIds": { 361 "2ea1ca41b38e": true 362 }, 363 "keywords": { 364 "$seen": true, 365 "$draft": true 366 }, 367 "from": [{ 368 "name": "Joe Bloggs", 369 "email": "joe@example.com" 370 }], 371 "to": [{ 372 "name": "John", 373 "email": "john@example.com" 374 }], 375 "header:Disposition-Notification-To:asText": "joe@example.com", 376 "subject": "World domination", 377 ... 378 } 379 } 380 }, "0" ]] 382 Note the specified "Disposition-Notification-To" header indicating 383 where to send MDN back (usually the sender of the email). 385 3.3. Parsing a received MDN 387 The client issues a parse request: 389 [[ "MDN/parse", { 390 "accountId": "ue150411c", 391 "blobIds: [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 392 }, "0" ]] 394 The server responds: 396 [[ "MDN/parse", { 397 "accountId": "ue150411c", 398 "parsed": { 399 "0f9f65ab-dc7b-4146-850f-6e4881093965": { 400 "forEmailId": "Md45b47b4877521042cec0938", 401 "subject": "Read receipt for: World domination", 402 "textBody": "This receipt shows that the email has been 403 displayed on your recipient's computer. There is no 404 guaranty it has been read or understood.", 405 "reportingUA": "linagora.com; OpenPaaS", 406 "disposition": { 407 "actionMode": "manual-action", 408 "sendingMode": "MDN-sent-manually", 409 "type": "displayed" 410 } 411 "finalRecipient": "rfc822; john@example.com", 412 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 413 } 414 } 415 }, "0" ]] 417 In case of a not found blobId, the server would respond: 419 [[ "MDN/parse", { 420 "accountId": "ue150411c", 421 "notFound": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 422 } 423 }, "0" ]] 425 If the blobId has been found but is not parsable, the server would 426 respond: 428 [[ "MDN/parse", { 429 "accountId": "ue150411c", 430 "notParsable": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 431 } 432 }, "0" ]] 434 4. IANA Considerations 436 4.1. JMAP Capability Registration for "mdn" 438 IANA will register the "mdn" JMAP Capability as follows: 440 Capability Name: "urn:ietf:params:jmap:mdn" 442 Specification document: this document 443 Intended use: common 445 Change Controller: IETF 447 Security and privacy considerations: this document, section 5. 449 4.2. JMAP Error Codes Registry 451 The following subsection register one new error code in the "JMAP 452 Error Codes" registry, as defined in [RFC8620]. 454 4.2.1. mdnAlreadySent 456 JMAP Error Code: mdnAlreadySent 458 Intended use: common 460 Change controller: IETF 462 Reference: This document, Section 2.1 464 Description: The message has the "$MDNSent" keyword already set. The 465 client MUST NOT try again to send an MDN for this message. 467 5. Security considerations 469 The same considerations regarding MDN (see [RFC8098] and [RFC3503]) 470 apply to this document. 472 6. References 474 6.1. Normative References 476 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 477 Requirement Levels", BCP 14, RFC 2119, 478 DOI 10.17487/RFC2119, March 1997, 479 . 481 [RFC3503] Melnikov, A., "Message Disposition Notification (MDN) 482 profile for Internet Message Access Protocol (IMAP)", 483 RFC 3503, DOI 10.17487/RFC3503, March 2003, 484 . 486 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 487 DOI 10.17487/RFC5322, October 2008, 488 . 490 [RFC8098] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition 491 Notification", STD 85, RFC 8098, DOI 10.17487/RFC8098, 492 February 2017, . 494 [RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application 495 Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 496 2019, . 498 [RFC8621] Jenkins, N. and C. Newman, "The JSON Meta Application 499 Protocol (JMAP) for Mail", RFC 8621, DOI 10.17487/RFC8621, 500 August 2019, . 502 6.2. Informative References 504 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 505 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 506 May 2017, . 508 Author's Address 510 Raphael Ouazana (editor) 511 Linagora 512 100 Terrasse Boieldieu - Tour Franklin 513 Paris - La Defense CEDEX 92042 514 France 516 Email: rouazana@linagora.com 517 URI: https://www.linagora.com