idnits 2.17.1 draft-ietf-jmap-mdn-06.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 28, 2020) is 1491 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 28, 2020 5 Expires: August 31, 2020 7 Handling Message Disposition Notification with JMAP 8 draft-ietf-jmap-mdn-06 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 31, 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 includeOriginalMessage: "Boolean" (default: false). If "true", 149 the content of the original message will appear in the third 150 component of the multipart/report generated for the MDN. See 151 [RFC8098] for details and security considerations. 153 o reportingUA: "String|null" Name of the MUA creating this MDN. It 154 is used to build the MDN Report part of the MDN. 156 o disposition: "Disposition" Object containing the diverse MDN 157 disposition options. 159 o mdnGateway: "String|null" (server-set) Name of the gateway or MTA 160 that translated a foreign (non-Internet) message disposition 161 notification into this MDN. 163 o originalRecipient: "String|null" (server-set) Original recipient 164 address as specified by the sender of the message for which the 165 MDN is being issued. 167 o finalRecipient: "String" (server-set) Recipient for which the MDN 168 is being issued. 170 o originalMessageId: "String|null" (server-set) Message-ID (the 171 [RFC5322] header field, not the JMAP Id) of the message for which 172 the MDN is being issued. 174 o error: "String[]|null" (server-set) Additional information in the 175 form of text messages when the "error" disposition modifier 176 appears. 178 o extensionFields: "String[String]|null" (server-set) Object where 179 keys are extension-field names and values are extension-field 180 values. 182 A *Disposition* object has the following properties: 184 o actionMode: "String" This MUST be one of the following strings: 185 "manual-action" / "automatic-action" 187 o sendingMode: "String" This MUST be one of the following strings: 188 "MDN-sent-manually" / "MDN-sent-automatically" 190 o type: "String" This MUST be one of the following strings: 191 "deleted" / "dispatched" / "displayed" / "processed" 193 See [RFC8098] for the exact meaning of these different fields. 195 2.1. MDN/send 197 The MDN/send method sends an [RFC5322] message from an MDN object. 198 When calling this method the "using" property of the Request object 199 MUST contain the capabilities "urn:ietf:params:jmap:mdn" and 200 "urn:ietf:params:jmap:mail". The latter because of the implicit call 201 to Email/set, described below. The method takes the following 202 arguments: 204 o accountId: "Id" The id of the account to use. 206 o send: "Id[MDN]" A map of creation id (client specified) to MDN 207 objects. 209 The response has the following arguments: 211 o accountId: "Id" The id of the account used for the call. 213 o sent: "Id[MDN]|null" A map of creation id to MDN containing any 214 properties that were not set by the client. This includes any 215 properties that were omitted by the client and thus set to a 216 default by the server. This argument is null if no MDN objects 217 were successfully sent. 219 o notSent: "Id[MDNError]|null" A map of the creation id to an 220 MDNError object for each record that failed to be sent, or null if 221 all successful. 223 The following MDNError types are defined: 225 o mdnAlreadySent: The message has the "$MDNSent" keyword already 226 set. 228 o forbidden: MDN/send would violate an ACL or other permissions 229 policy. 231 o overQuota: MDN/send would exceed a server-defined limit on the 232 number or total size of sent MDN. It could include limitations on 233 sent emails. 235 o tooLarge: MDN/send would result in an MDN that exceeds a server- 236 defined limit for the maximum size of an MDN, or more generally on 237 emails. 239 o rateLimit: Too many MDN or emails have been created recently, and 240 a server-defined rate limit has been reached. It may work if 241 tried again later. 243 o invalidProperties: The record given is invalid in some way. 245 The client SHOULD NOT issue an MDN/send request if the message has 246 the "$MDNSent" keyword set. 248 When sending the MDN, the server is in charge of generating the 249 "originalRecipient", "finalRecipient" and "originalMessageId" fields 250 accordingly to the [RFC8098] specification. 252 After all items in the "MDN/send" invocation have been processed, a 253 single implicit "Email/set" call MUST be made to set the "$MDNSent" 254 keyword on "Email" objects referenced by "MDN" objects that have been 255 successfully created (see [RFC3503] for more details). The response 256 to this MUST be returned after the "MDN/send" response. 258 2.2. MDN/parse 260 This method allows a client to parse blobs as [RFC5322] messages to 261 get MDN objects. This can be used to parse and get detailed 262 information about blobs referenced in the "mdnBlobIds" of the 263 EmailSubmission object, or any email the client could expect to be an 264 MDN. 266 The "forEmailId" property can be null or missing if the 267 "originalMessageId" property is missing or not referencing an 268 existing email. 270 The MDN/parse method takes the following arguments: 272 o accountId: "Id" The id of the account to use. 274 o blobIds: "Id[]" The ids of the blobs to parse. 276 The response has the following arguments: 278 o accountId: "Id" The id of the account used for the call. 280 o parsed: "Id[MDN]|null" A map of blob id to parsed MDN 281 representation for each successfully parsed blob, or null if none. 283 o notParsable: "Id[]|null" A list of ids given that corresponded to 284 blobs that could not be parsed as MDNs, or null if none. 286 o notFound: "Id[]|null" A list of blob ids given that could not be 287 found, or null if none. 289 The following additional error may be returned instead of the MDN/ 290 parse response: 292 o requestTooLarge: The number of ids requested by the client exceeds 293 the maximum number the server is willing to process in a single 294 method call. 296 3. Samples 298 3.1. Sending an MDN for a received email 300 A client can use the following request to send an MDN back to the 301 sender: 303 [[ "MDN/send", { 304 "accountId": "ue150411c", 305 "send": { 306 "k1546": { 307 "forEmailId": "Md45b47b4877521042cec0938", 308 "subject": "Read receipt for: World domination", 309 "textBody": "This receipt shows that the email has been 310 displayed on your recipient's computer. There is no 311 guaranty it has been read or understood.", 312 "reportingUA": "linagora.com; OpenPaaS", 313 "disposition": { 314 "actionMode": "manual-action", 315 "sendingMode": "MDN-sent-manually", 316 "type": "displayed" 317 } 318 } 319 } 320 }, "0" ]] 322 If the email id matches an existing email without the "$MDNSent" 323 keyword, the server can answer: 325 [[ "MDN/send", { 326 "accountId": "ue150411c", 327 "sent": { 328 "k1546": { 329 "finalRecipient": "rfc822; john@example.com", 330 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 331 } 332 } 333 }, "0" ], 334 [ "Email/set", { 335 "accountId": "ue150411c", 336 "oldState": "23", 337 "newState": "42", 338 "updated": { 339 "Md45b47b4877521042cec0938": { 340 "keywords": { 341 "$MDNSent": true 342 } 343 } 344 } 345 }, "0" ]] 347 If the "$MDNSent" keyword has already been set, the server can answer 348 an error: 350 [[ "MDN/send", { 351 "accountId": "ue150411c", 352 "notSent": { 353 "k1546": { 354 "type": "mdnAlreadySent", 355 "description" : "$MDNSent keyword is already present" 356 } 357 } 358 }, "0" ]] 360 3.2. Asking for MDN when sending an email 362 This is done with the [RFC8621] "Email/set" "create" method. 364 [[ "Email/set", { 365 "accountId": "ue150411c", 366 "create": { 367 "k1546": { 368 "mailboxIds": { 369 "2ea1ca41b38e": true 370 }, 371 "keywords": { 372 "$seen": true, 373 "$draft": true 374 }, 375 "from": [{ 376 "name": "Joe Bloggs", 377 "email": "joe@example.com" 378 }], 379 "to": [{ 380 "name": "John", 381 "email": "john@example.com" 382 }], 383 "header:Disposition-Notification-To:asText": "joe@example.com", 384 "subject": "World domination", 385 ... 386 } 387 } 388 }, "0" ]] 390 Note the specified "Disposition-Notification-To" header indicating 391 where to send MDN back (usually the sender of the email). 393 3.3. Parsing a received MDN 395 The client issues a parse request: 397 [[ "MDN/parse", { 398 "accountId": "ue150411c", 399 "blobIds: [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 400 }, "0" ]] 402 The server responds: 404 [[ "MDN/parse", { 405 "accountId": "ue150411c", 406 "parsed": { 407 "0f9f65ab-dc7b-4146-850f-6e4881093965": { 408 "forEmailId": "Md45b47b4877521042cec0938", 409 "subject": "Read receipt for: World domination", 410 "textBody": "This receipt shows that the email has been 411 displayed on your recipient's computer. There is no 412 guaranty it has been read or understood.", 413 "reportingUA": "linagora.com; OpenPaaS", 414 "disposition": { 415 "actionMode": "manual-action", 416 "sendingMode": "MDN-sent-manually", 417 "type": "displayed" 418 } 419 "finalRecipient": "rfc822; john@example.com", 420 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 421 } 422 } 423 }, "0" ]] 425 In case of a not found blobId, the server would respond: 427 [[ "MDN/parse", { 428 "accountId": "ue150411c", 429 "notFound": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 430 }, "0" ]] 432 If the blobId has been found but is not parsable, the server would 433 respond: 435 [[ "MDN/parse", { 436 "accountId": "ue150411c", 437 "notParsable": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 438 }, "0" ]] 440 4. IANA Considerations 442 4.1. JMAP Capability Registration for "mdn" 444 IANA will register the "mdn" JMAP Capability as follows: 446 Capability Name: "urn:ietf:params:jmap:mdn" 448 Specification document: this document 450 Intended use: common 451 Change Controller: IETF 453 Security and privacy considerations: this document, section 5. 455 4.2. JMAP Error Codes Registry 457 The following subsection register one new error code in the "JMAP 458 Error Codes" registry, as defined in [RFC8620]. 460 4.2.1. mdnAlreadySent 462 JMAP Error Code: mdnAlreadySent 464 Intended use: common 466 Change controller: IETF 468 Reference: This document, Section 2.1 470 Description: The message has the "$MDNSent" keyword already set. The 471 client MUST NOT try again to send an MDN for this message. 473 5. Security considerations 475 The same considerations regarding MDN (see [RFC8098] and [RFC3503]) 476 apply to this document. 478 6. References 480 6.1. Normative References 482 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 483 Requirement Levels", BCP 14, RFC 2119, 484 DOI 10.17487/RFC2119, March 1997, 485 . 487 [RFC3503] Melnikov, A., "Message Disposition Notification (MDN) 488 profile for Internet Message Access Protocol (IMAP)", 489 RFC 3503, DOI 10.17487/RFC3503, March 2003, 490 . 492 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 493 DOI 10.17487/RFC5322, October 2008, 494 . 496 [RFC8098] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition 497 Notification", STD 85, RFC 8098, DOI 10.17487/RFC8098, 498 February 2017, . 500 [RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application 501 Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 502 2019, . 504 [RFC8621] Jenkins, N. and C. Newman, "The JSON Meta Application 505 Protocol (JMAP) for Mail", RFC 8621, DOI 10.17487/RFC8621, 506 August 2019, . 508 6.2. Informative References 510 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 511 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 512 May 2017, . 514 Author's Address 516 Raphael Ouazana (editor) 517 Linagora 518 100 Terrasse Boieldieu - Tour Franklin 519 Paris - La Defense CEDEX 92042 520 France 522 Email: rouazana@linagora.com 523 URI: https://www.linagora.com