idnits 2.17.1 draft-ietf-jmap-mdn-08.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 (March 19, 2020) is 1497 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 March 19, 2020 5 Expires: September 20, 2020 7 Handling Message Disposition Notification with JMAP 8 draft-ietf-jmap-mdn-08 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 September 20, 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 . . . . . . . . . . 9 59 3.3. Parsing a received MDN . . . . . . . . . . . . . . . . . 9 60 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 61 4.1. JMAP Capability Registration for "mdn" . . . . . . . . . 11 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 Keywords being case insensitive in IMAP but JSON being case 118 sensitive, the "$mdnsent" keyword MUST always be used in lowercase. 120 1.3. Addition to the capabilities object 122 Capabilities are announced as part of the standard JMAP Session 123 resource; see [RFC8620], section 2. 125 Support for the "MDN" data type and the "MDN/parse" method are 126 represented by the capability "urn:ietf:params:jmap:mdn" being 127 present in the "capabilities" property. The capability 128 "urn:ietf:params:jmap:mdn" being present in the "accountCapabilities" 129 property of an account represents support for creating and sending 130 MDN messages via the "MDN/send" method. Servers that include the 131 capability in one or more "accountCapabilities" properties MUST also 132 include the property in the "capabilities" property. 134 The value of this "urn:ietf:params:jmap:mdn" property is an empty 135 object in both the JMAP session "capabilities" property and an 136 account's "accountCapabilities" property. 138 2. MDN 140 An *MDN* object has the following properties: 142 o forEmailId: "Id|null" Email Id of the received email this MDN is 143 relative to. This argument can only be null when the MDN object 144 is a server response for the "MDN/parse" method. 146 o subject: "String|null" Subject used as "Subject" header for this 147 MDN. 149 o textBody: "String|null" Human readable part of the MDN, as plain 150 text. 152 o includeOriginalMessage: "Boolean" (default: false). If "true", 153 the content of the original message will appear in the third 154 component of the multipart/report generated for the MDN. See 155 [RFC8098] for details and security considerations. 157 o reportingUA: "String|null" Name of the MUA creating this MDN. It 158 is used to build the MDN Report part of the MDN. 160 o disposition: "Disposition" Object containing the diverse MDN 161 disposition options. 163 o mdnGateway: "String|null" (server-set) Name of the gateway or MTA 164 that translated a foreign (non-Internet) message disposition 165 notification into this MDN. 167 o originalRecipient: "String|null" (server-set) Original recipient 168 address as specified by the sender of the message for which the 169 MDN is being issued. 171 o finalRecipient: "String" (server-set) Recipient for which the MDN 172 is being issued. 174 o originalMessageId: "String|null" (server-set) Message-ID (the 175 [RFC5322] header field, not the JMAP Id) of the message for which 176 the MDN is being issued. 178 o error: "String[]|null" (server-set) Additional information in the 179 form of text messages when the "error" disposition modifier 180 appears. 182 o extensionFields: "String[String]|null" (server-set) Object where 183 keys are extension-field names and values are extension-field 184 values. 186 A *Disposition* object has the following properties: 188 o actionMode: "String" This MUST be one of the following strings: 189 "manual-action" / "automatic-action" 191 o sendingMode: "String" This MUST be one of the following strings: 192 "MDN-sent-manually" / "MDN-sent-automatically" 194 o type: "String" This MUST be one of the following strings: 195 "deleted" / "dispatched" / "displayed" / "processed" 197 See [RFC8098] for the exact meaning of these different fields. 199 2.1. MDN/send 201 The MDN/send method sends an [RFC5322] message from an MDN object. 202 When calling this method the "using" property of the Request object 203 MUST contain the capabilities "urn:ietf:params:jmap:mdn" and 204 "urn:ietf:params:jmap:mail". The latter because of the implicit call 205 to Email/set and the use of Identities, described below. The method 206 takes the following arguments: 208 o accountId: "Id" The id of the account to use. 210 o identity: "Id" The id of the Identity to associate with these MDN. 211 The server will use this identity to define the sender of the MDN 212 and to set the finalRecipient field. 214 o send: "Id[MDN]" A map of creation id (client specified) to MDN 215 objects. 217 The response has the following arguments: 219 o accountId: "Id" The id of the account used for the call. 221 o sent: "Id[MDN]|null" A map of creation id to MDN containing any 222 properties that were not set by the client. This includes any 223 properties that were omitted by the client and thus set to a 224 default by the server. This argument is null if no MDN objects 225 were successfully sent. 227 o notSent: "Id[MDNError]|null" A map of the creation id to an 228 MDNError object for each record that failed to be sent, or null if 229 all successful. 231 The following MDNError types are defined: 233 o mdnAlreadySent: The message has the "$mdnsent" keyword already 234 set. 236 o notFound: The reference Email Id cannot be found, or has no valid 237 "Disposition-Notification-To" header. 239 o forbidden: MDN/send would violate an ACL or other permissions 240 policy. 242 o overQuota: MDN/send would exceed a server-defined limit on the 243 number or total size of sent MDN. It could include limitations on 244 sent emails. 246 o tooLarge: MDN/send would result in an MDN that exceeds a server- 247 defined limit for the maximum size of an MDN, or more generally on 248 emails. 250 o rateLimit: Too many MDN or emails have been created recently, and 251 a server-defined rate limit has been reached. It may work if 252 tried again later. 254 o invalidProperties: The record given is invalid in some way. 256 If the Account Id or Identity id given cannot be found, the MDN 257 sending is rejected with an "invalidProperties" error. 259 The client SHOULD NOT issue an MDN/send request if the message has 260 the "$mdnsent" keyword set. 262 When sending the MDN, the server is in charge of generating the 263 "originalRecipient", "finalRecipient" and "originalMessageId" fields 264 accordingly to the [RFC8098] specification. 266 After all items in the "MDN/send" invocation have been processed, a 267 single implicit "Email/set" call MUST be made to set the "$mdnsent" 268 keyword on "Email" objects referenced by "MDN" objects that have been 269 successfully created (see [RFC3503] for more details). The response 270 to this MUST be returned after the "MDN/send" response. 272 2.2. MDN/parse 274 This method allows a client to parse blobs as [RFC5322] messages to 275 get MDN objects. This can be used to parse and get detailed 276 information about blobs referenced in the "mdnBlobIds" of the 277 EmailSubmission object, or any email the client could expect to be an 278 MDN. 280 The "forEmailId" property can be null or missing if the 281 "originalMessageId" property is missing or not referencing an 282 existing email. 284 The MDN/parse method takes the following arguments: 286 o accountId: "Id" The id of the account to use. 288 o blobIds: "Id[]" The ids of the blobs to parse. 290 The response has the following arguments: 292 o accountId: "Id" The id of the account used for the call. 294 o parsed: "Id[MDN]|null" A map of blob id to parsed MDN 295 representation for each successfully parsed blob, or null if none. 297 o notParsable: "Id[]|null" A list of ids given that corresponded to 298 blobs that could not be parsed as MDNs, or null if none. 300 o notFound: "Id[]|null" A list of blob ids given that could not be 301 found, or null if none. 303 The following additional errors may be returned instead of the MDN/ 304 parse response: 306 o requestTooLarge: The number of ids requested by the client exceeds 307 the maximum number the server is willing to process in a single 308 method call. 310 o invalidProperties: If the Account Id given cannot be found, the 311 MDN parsing is rejected with an "invalidProperties" error. 313 3. Samples 315 3.1. Sending an MDN for a received email 317 A client can use the following request to send an MDN back to the 318 sender: 320 [[ "MDN/send", { 321 "accountId": "ue150411c", 322 "send": { 323 "k1546": { 324 "forEmailId": "Md45b47b4877521042cec0938", 325 "subject": "Read receipt for: World domination", 326 "textBody": "This receipt shows that the email has been 327 displayed on your recipient's computer. There is no 328 guaranty it has been read or understood.", 329 "reportingUA": "linagora.com; OpenPaaS", 330 "disposition": { 331 "actionMode": "manual-action", 332 "sendingMode": "MDN-sent-manually", 333 "type": "displayed" 334 } 335 } 336 } 337 }, "0" ]] 339 If the email id matches an existing email without the "$mdnsent" 340 keyword, the server can answer: 342 [[ "MDN/send", { 343 "accountId": "ue150411c", 344 "sent": { 345 "k1546": { 346 "finalRecipient": "rfc822; john@example.com", 347 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 348 } 349 } 350 }, "0" ], 351 [ "Email/set", { 352 "accountId": "ue150411c", 353 "oldState": "23", 354 "newState": "42", 355 "updated": { 356 "Md45b47b4877521042cec0938": { 357 "keywords": { 358 "$mdnsent": true 359 } 360 } 361 } 362 }, "0" ]] 364 If the "$mdnsent" keyword has already been set, the server can answer 365 an error: 367 [[ "MDN/send", { 368 "accountId": "ue150411c", 369 "notSent": { 370 "k1546": { 371 "type": "mdnAlreadySent", 372 "description" : "$mdnsent keyword is already present" 373 } 374 } 375 }, "0" ]] 377 3.2. Asking for MDN when sending an email 379 This is done with the [RFC8621] "Email/set" "create" method. 381 [[ "Email/set", { 382 "accountId": "ue150411c", 383 "create": { 384 "k1546": { 385 "mailboxIds": { 386 "2ea1ca41b38e": true 387 }, 388 "keywords": { 389 "$seen": true, 390 "$draft": true 391 }, 392 "from": [{ 393 "name": "Joe Bloggs", 394 "email": "joe@example.com" 395 }], 396 "to": [{ 397 "name": "John", 398 "email": "john@example.com" 399 }], 400 "header:Disposition-Notification-To:asText": "joe@example.com", 401 "subject": "World domination", 402 ... 403 } 404 } 405 }, "0" ]] 407 Note the specified "Disposition-Notification-To" header indicating 408 where to send MDN back (usually the sender of the email). 410 3.3. Parsing a received MDN 412 The client issues a parse request: 414 [[ "MDN/parse", { 415 "accountId": "ue150411c", 416 "blobIds: [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 417 }, "0" ]] 419 The server responds: 421 [[ "MDN/parse", { 422 "accountId": "ue150411c", 423 "parsed": { 424 "0f9f65ab-dc7b-4146-850f-6e4881093965": { 425 "forEmailId": "Md45b47b4877521042cec0938", 426 "subject": "Read receipt for: World domination", 427 "textBody": "This receipt shows that the email has been 428 displayed on your recipient's computer. There is no 429 guaranty it has been read or understood.", 430 "reportingUA": "linagora.com; OpenPaaS", 431 "disposition": { 432 "actionMode": "manual-action", 433 "sendingMode": "MDN-sent-manually", 434 "type": "displayed" 435 } 436 "finalRecipient": "rfc822; john@example.com", 437 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 438 } 439 } 440 }, "0" ]] 442 In case of a not found blobId, the server would respond: 444 [[ "MDN/parse", { 445 "accountId": "ue150411c", 446 "notFound": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 447 }, "0" ]] 449 If the blobId has been found but is not parsable, the server would 450 respond: 452 [[ "MDN/parse", { 453 "accountId": "ue150411c", 454 "notParsable": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 455 }, "0" ]] 457 4. IANA Considerations 458 4.1. JMAP Capability Registration for "mdn" 460 IANA will register the "mdn" JMAP Capability as follows: 462 Capability Name: "urn:ietf:params:jmap:mdn" 464 Specification document: this document 466 Intended use: common 468 Change Controller: IETF 470 Security and privacy considerations: this document, section 5. 472 4.2. JMAP Error Codes Registry 474 The following subsection register one new error code in the "JMAP 475 Error Codes" registry, as defined in [RFC8620]. 477 4.2.1. mdnAlreadySent 479 JMAP Error Code: mdnAlreadySent 481 Intended use: common 483 Change controller: IETF 485 Reference: This document, Section 2.1 487 Description: The message has the "$mdnsent" keyword already set. The 488 client MUST NOT try again to send an MDN for this message. 490 5. Security considerations 492 The same considerations regarding MDN (see [RFC8098] and [RFC3503]) 493 apply to this document. 495 6. References 497 6.1. Normative References 499 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 500 Requirement Levels", BCP 14, RFC 2119, 501 DOI 10.17487/RFC2119, March 1997, 502 . 504 [RFC3503] Melnikov, A., "Message Disposition Notification (MDN) 505 profile for Internet Message Access Protocol (IMAP)", 506 RFC 3503, DOI 10.17487/RFC3503, March 2003, 507 . 509 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 510 DOI 10.17487/RFC5322, October 2008, 511 . 513 [RFC8098] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition 514 Notification", STD 85, RFC 8098, DOI 10.17487/RFC8098, 515 February 2017, . 517 [RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application 518 Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 519 2019, . 521 [RFC8621] Jenkins, N. and C. Newman, "The JSON Meta Application 522 Protocol (JMAP) for Mail", RFC 8621, DOI 10.17487/RFC8621, 523 August 2019, . 525 6.2. Informative References 527 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 528 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 529 May 2017, . 531 Author's Address 533 Raphael Ouazana (editor) 534 Linagora 535 100 Terrasse Boieldieu - Tour Franklin 536 Paris - La Defense CEDEX 92042 537 France 539 Email: rouazana@linagora.com 540 URI: https://www.linagora.com