idnits 2.17.1 draft-ietf-jmap-mdn-11.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 ([RFC8620], [RFC8098], [RFC8621]), 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 (June 22, 2020) is 1404 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 June 22, 2020 5 Expires: December 24, 2020 7 Handling Message Disposition Notification with JMAP 8 draft-ietf-jmap-mdn-11 10 Abstract 12 JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic 13 protocol for synchronising data, such as mail, calendars or contacts, 14 between a client and a server. It is optimised for mobile and web 15 environments, and aims to provide a consistent interface to different 16 data types. 18 JMAP for Mail ([RFC8621] - The JSON Meta Application Protocol (JMAP) 19 for Mail) specifies a data model for synchronising email data with a 20 server using JMAP. Clients can use this to efficiently search, 21 access, organise, and send messages. 23 MDN are defined in [RFC8098] and are used as "read receipts", 24 "acknowledgements", or "receipt notifications". 26 MDN have a specific format that must be parsed or generated. The 27 goal of this document is to specify a data model for handling MDN 28 messages with a server using JMAP. 30 Status of This Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at https://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on December 24, 2020. 47 Copyright Notice 49 Copyright (c) 2020 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (https://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with respect 57 to this document. Code Components extracted from this document must 58 include Simplified BSD License text as described in Section 4.e of 59 the Trust Legal Provisions and are provided without warranty as 60 described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 65 1.1. Notational conventions . . . . . . . . . . . . . . . . . 3 66 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 67 1.3. Addition to the capabilities object . . . . . . . . . . . 4 68 2. MDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 69 2.1. MDN/send . . . . . . . . . . . . . . . . . . . . . . . . 5 70 2.2. MDN/parse . . . . . . . . . . . . . . . . . . . . . . . . 7 71 3. Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 72 3.1. Sending an MDN for a received email . . . . . . . . . . . 8 73 3.2. Asking for MDN when sending an email . . . . . . . . . . 9 74 3.3. Parsing a received MDN . . . . . . . . . . . . . . . . . 10 75 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 76 4.1. JMAP Capability Registration for "mdn" . . . . . . . . . 11 77 4.2. JMAP Error Codes Registry . . . . . . . . . . . . . . . . 12 78 4.2.1. mdnAlreadySent . . . . . . . . . . . . . . . . . . . 12 79 5. Security considerations . . . . . . . . . . . . . . . . . . . 12 80 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 81 6.1. Normative References . . . . . . . . . . . . . . . . . . 12 82 6.2. Informative References . . . . . . . . . . . . . . . . . 13 83 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 13 85 1. Introduction 87 JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic 88 protocol for synchronising data, such as mail, calendars or contacts, 89 between a client and a server. It is optimised for mobile and web 90 environments, and aims to provide a consistent interface to different 91 data types. 93 JMAP for Mail ([RFC8621] - The JSON Meta Application Protocol (JMAP) 94 for Mail) specifies a data model for synchronising email data with a 95 server using JMAP. Clients can use this to efficiently search, 96 access, organise, and send messages. 98 MDN are defined in [RFC8098] and are used as "read receipts", 99 "acknowledgements", or "receipt notifications". 101 A client can have to deal with MDN in different ways: 103 1. When receiving an email, an MDN can be sent to the sender. This 104 specification defines an MDN/send method to cover this case. 106 2. When sending an email, an MDN can be requested. This must be 107 done with the help of a header, and is already specified by 108 [RFC8098] and can already be handled by [RFC8621] this way. 110 3. When receiving an MDN, the MDN could be related to an existing 111 sent mail. This is already covered by [RFC8621] in the 112 EmailSubmission object. Client might want to display detailed 113 information about a received MDN. This specification defines an 114 MDN/parse method to cover this case. 116 1.1. Notational conventions 118 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 119 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 120 "OPTIONAL" in this document are to be interpreted as described in BCP 121 14 [RFC2119] [RFC8174] when, and only when, they appear in all 122 capitals, as shown here. 124 Type signatures, examples and property descriptions in this document 125 follow the conventions established in section 1.1 of [RFC8620]. Data 126 types defined in the core specification are also used in this 127 document. 129 Servers MUST support all properties specified for the new data types 130 defined in this document. 132 1.2. Terminology 134 The same terminology is used in this document as in the core JMAP 135 specification. 137 Keywords being case insensitive in IMAP but JSON being case 138 sensitive, the "$mdnsent" keyword MUST always be used in lowercase. 140 1.3. Addition to the capabilities object 142 Capabilities are announced as part of the standard JMAP Session 143 resource; see [RFC8620], section 2. 145 The capability "urn:ietf:params:jmap:mdn" being present in the 146 "accountCapabilities" property of an account represents support for 147 the "MDN" data type, parsing MDN via the "MDN/parse" method, and 148 creating and sending MDN messages via the "MDN/send" method. Servers 149 that include the capability in one or more "accountCapabilities" 150 properties MUST also include the property in the "capabilities" 151 property. 153 The value of this "urn:ietf:params:jmap:mdn" property is an empty 154 object in the account's "accountCapabilities" property. 156 2. MDN 158 An *MDN* object has the following properties: 160 o forEmailId: "Id|null" Email Id of the received email this MDN is 161 relative to. This property MUST NOT be null for "MDN/send", but 162 may be null in the response from the "MDN/parse" method. 164 o subject: "String|null" Subject used as "Subject" header for this 165 MDN. 167 o textBody: "String|null" Human readable part of the MDN, as plain 168 text. 170 o includeOriginalMessage: "Boolean" (default: false). If "true", 171 the content of the original message will appear in the third 172 component of the multipart/report generated for the MDN. See 173 [RFC8098] for details and security considerations. 175 o reportingUA: "String|null" Name of the MUA creating this MDN. It 176 is used to build the MDN Report part of the MDN. 178 o disposition: "Disposition" Object containing the diverse MDN 179 disposition options. 181 o mdnGateway: "String|null" (server-set) Name of the gateway or MTA 182 that translated a foreign (non-Internet) message disposition 183 notification into this MDN. 185 o originalRecipient: "String|null" (server-set) Original recipient 186 address as specified by the sender of the message for which the 187 MDN is being issued. 189 o finalRecipient: "String|null" Recipient for which the MDN is being 190 issued. if set, it overrides the value that would be calculated 191 by the server from the Identity. 193 o originalMessageId: "String|null" (server-set) Message-ID (the 194 [RFC5322] header field, not the JMAP Id) of the message for which 195 the MDN is being issued. 197 o error: "String[]|null" (server-set) Additional information in the 198 form of text messages when the "error" disposition modifier 199 appears. 201 o extensionFields: "String[String]|null" Object where keys are 202 extension-field names and values are extension-field values. 204 A *Disposition* object has the following properties: 206 o actionMode: "String" This MUST be one of the following strings: 207 "manual-action" / "automatic-action" 209 o sendingMode: "String" This MUST be one of the following strings: 210 "mdn-sent-manually" / "mdn-sent-automatically" 212 o type: "String" This MUST be one of the following strings: 213 "deleted" / "dispatched" / "displayed" / "processed" 215 See [RFC8098] for the exact meaning of these different fields. These 216 fields are defined case insensitive in [RFC8098] but are case 217 sensitive in this RFC and MUST be converted to lowercase by "MDN/ 218 parse". 220 2.1. MDN/send 222 The MDN/send method sends an [RFC5322] message from an MDN object. 223 When calling this method the "using" property of the Request object 224 MUST contain the capabilities "urn:ietf:params:jmap:mdn" and 225 "urn:ietf:params:jmap:mail". The latter because of the implicit call 226 to Email/set and the use of Identities, described below. The method 227 takes the following arguments: 229 o accountId: "Id" The id of the account to use. 231 o identityId: "Id" The id of the Identity to associate with these 232 MDN. The server will use this identity to define the sender of 233 the MDN and to set the finalRecipient field. 235 o send: "Id[MDN]" A map of creation id (client specified) to MDN 236 objects. 238 o onSuccessUpdateEmail: "Id[PatchObject]|null" A map of creation id 239 to an object containing properties to update on the Email object 240 referenced by the "MDN/send" if the sending succeeds. 242 The response has the following arguments: 244 o accountId: "Id" The id of the account used for the call. 246 o sent: "Id[MDN]|null" A map of creation id to MDN containing any 247 properties that were not set by the client. This includes any 248 properties that were omitted by the client and thus set to a 249 default by the server. This argument is null if no MDN objects 250 were successfully sent. 252 o notSent: "Id[SetError]|null" A map of the creation id to a 253 SetError object for each record that failed to be sent, or null if 254 all successful. 256 The following already registered SetError would mean: 258 o notFound: The reference Email Id cannot be found, or has no valid 259 "Disposition-Notification-To" header. 261 o forbidden: MDN/send would violate an ACL or other permissions 262 policy. 264 o forbiddenFrom: The user is not allowed to use the given 265 finalRecipient property. 267 o overQuota: MDN/send would exceed a server-defined limit on the 268 number or total size of sent MDN. It could include limitations on 269 sent emails. 271 o tooLarge: MDN/send would result in an MDN that exceeds a server- 272 defined limit for the maximum size of an MDN, or more generally on 273 emails. 275 o rateLimit: Too many MDN or emails have been created recently, and 276 a server-defined rate limit has been reached. It may work if 277 tried again later. 279 o invalidProperties: The record given is invalid in some way. 281 The following is a new SetError: 283 o mdnAlreadySent: The message has the "$mdnsent" keyword already 284 set. 286 If the accountId or identityId given cannot be found, the method call 287 is rejected with an "invalidArguments" error. 289 The client SHOULD NOT issue an MDN/send request if the message has 290 the "$mdnsent" keyword set. 292 When sending the MDN, the server is in charge of generating the 293 "originalRecipient", "finalRecipient" and "originalMessageId" fields 294 according to the [RFC8098] specification. 296 The client is expected to explicitly update each "Email" for which an 297 "MDN/send" has been invoked in order to set the "$mdnsent" keyword on 298 these emails. To ensure that, the server MUST reject an "MDN/send" 299 which does not result in setting the keyword "$mdnsent". Thus the 300 server MUST check that the "onSuccessUpdateEmail" property of the 301 method is correctly set to update this keyword. 303 2.2. MDN/parse 305 This method allows a client to parse blobs as [RFC5322] messages to 306 get MDN objects. This can be used to parse and get detailed 307 information about blobs referenced in the "mdnBlobIds" of the 308 EmailSubmission object, or any email the client could expect to be an 309 MDN. 311 The "forEmailId" property can be null or missing if the 312 "originalMessageId" property is missing, not referencing an existing 313 email or if the server cannot efficiently calculate the related email 314 (for example if several emails get the same "Message-Id" header). 316 The MDN/parse method takes the following arguments: 318 o accountId: "Id" The id of the account to use. 320 o blobIds: "Id[]" The ids of the blobs to parse. 322 The response has the following arguments: 324 o accountId: "Id" The id of the account used for the call. 326 o parsed: "Id[MDN]|null" A map of blob id to parsed MDN 327 representation for each successfully parsed blob, or null if none. 329 o notParsable: "Id[]|null" A list of ids given that corresponded to 330 blobs that could not be parsed as MDNs, or null if none. 332 o notFound: "Id[]|null" A list of blob ids given that could not be 333 found, or null if none. 335 The following additional errors may be returned instead of the MDN/ 336 parse response: 338 o requestTooLarge: The number of ids requested by the client exceeds 339 the maximum number the server is willing to process in a single 340 method call. 342 o invalidArguments: If the accountId given cannot be found, the MDN 343 parsing is rejected with an "invalidArguments" error. 345 3. Samples 347 3.1. Sending an MDN for a received email 349 A client can use the following request to send an MDN back to the 350 sender: 352 [[ "MDN/send", { 353 "accountId": "ue150411c", 354 "identityId": "I64588216", 355 "send": { 356 "k1546": { 357 "forEmailId": "Md45b47b4877521042cec0938", 358 "subject": "Read receipt for: World domination", 359 "textBody": "This receipt shows that the email has been 360 displayed on your recipient's computer. There is no 361 guaranty it has been read or understood.", 362 "reportingUA": "linagora.com; OpenPaaS", 363 "disposition": { 364 "actionMode": "manual-action", 365 "sendingMode": "mdn-sent-manually", 366 "type": "displayed" 367 } 368 "extension": { 369 "X-EXTENSION-EXAMPLE": "example.com" 370 } 371 } 372 }, 373 "onSuccessUpdateEmail": { 374 "#k1546": { 375 "keywords/$mdnsent": true 376 } 377 } 378 }, "0" ]] 380 If the email id matches an existing email without the "$mdnsent" 381 keyword, the server can answer: 383 [[ "MDN/send", { 384 "accountId": "ue150411c", 385 "sent": { 386 "k1546": { 387 "finalRecipient": "rfc822; john@example.com", 388 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 389 } 390 } 391 }, "0" ], 392 [ "Email/set", { 393 "accountId": "ue150411c", 394 "oldState": "23", 395 "newState": "42", 396 "updated": { 397 "Md45b47b4877521042cec0938": { 398 "keywords": { 399 "$mdnsent": true 400 } 401 } 402 } 403 }, "0" ]] 405 If the "$mdnsent" keyword has already been set, the server can answer 406 an error: 408 [[ "MDN/send", { 409 "accountId": "ue150411c", 410 "notSent": { 411 "k1546": { 412 "type": "mdnAlreadySent", 413 "description" : "$mdnsent keyword is already present" 414 } 415 } 416 }, "0" ]] 418 3.2. Asking for MDN when sending an email 420 This is done with the [RFC8621] "Email/set" "create" method. 422 [[ "Email/set", { 423 "accountId": "ue150411c", 424 "create": { 425 "k1546": { 426 "mailboxIds": { 427 "2ea1ca41b38e": true 428 }, 429 "keywords": { 430 "$seen": true, 431 "$draft": true 432 }, 433 "from": [{ 434 "name": "Joe Bloggs", 435 "email": "joe@example.com" 436 }], 437 "to": [{ 438 "name": "John", 439 "email": "john@example.com" 440 }], 441 "header:Disposition-Notification-To:asText": "joe@example.com", 442 "subject": "World domination", 443 ... 444 } 445 } 446 }, "0" ]] 448 Note the specified "Disposition-Notification-To" header indicating 449 where to send MDN back (usually the sender of the email). 451 3.3. Parsing a received MDN 453 The client issues a parse request: 455 [[ "MDN/parse", { 456 "accountId": "ue150411c", 457 "blobIds: [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 458 }, "0" ]] 460 The server responds: 462 [[ "MDN/parse", { 463 "accountId": "ue150411c", 464 "parsed": { 465 "0f9f65ab-dc7b-4146-850f-6e4881093965": { 466 "forEmailId": "Md45b47b4877521042cec0938", 467 "subject": "Read receipt for: World domination", 468 "textBody": "This receipt shows that the email has been 469 displayed on your recipient's computer. There is no 470 guaranty it has been read or understood.", 471 "reportingUA": "linagora.com; OpenPaaS", 472 "disposition": { 473 "actionMode": "manual-action", 474 "sendingMode": "mdn-sent-manually", 475 "type": "displayed" 476 } 477 "finalRecipient": "rfc822; john@example.com", 478 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 479 } 480 } 481 }, "0" ]] 483 In case of a not found blobId, the server would respond: 485 [[ "MDN/parse", { 486 "accountId": "ue150411c", 487 "notFound": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 488 }, "0" ]] 490 If the blobId has been found but is not parsable, the server would 491 respond: 493 [[ "MDN/parse", { 494 "accountId": "ue150411c", 495 "notParsable": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 496 }, "0" ]] 498 4. IANA Considerations 500 4.1. JMAP Capability Registration for "mdn" 502 IANA will register the "mdn" JMAP Capability as follows: 504 Capability Name: "urn:ietf:params:jmap:mdn" 506 Specification document: this document 508 Intended use: common 509 Change Controller: IETF 511 Security and privacy considerations: this document, section 5. 513 4.2. JMAP Error Codes Registry 515 The following subsection register one new error code in the "JMAP 516 Error Codes" registry, as defined in [RFC8620]. 518 4.2.1. mdnAlreadySent 520 JMAP Error Code: mdnAlreadySent 522 Intended use: common 524 Change controller: IETF 526 Reference: This document, Section 2.1 528 Description: The message has the "$mdnsent" keyword already set. The 529 client MUST NOT try again to send an MDN for this message. 531 5. Security considerations 533 The same considerations regarding MDN (see [RFC8098] and [RFC3503]) 534 apply to this document. 536 In order to enforce trust regarding the relation between the user 537 sending an email and the identity of this user, the server SHOULD 538 validate in conformance to the provided Identity that the user is 539 permitted to use the finalRecipient value and return a forbiddenFrom 540 error if not. 542 6. References 544 6.1. Normative References 546 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 547 Requirement Levels", BCP 14, RFC 2119, 548 DOI 10.17487/RFC2119, March 1997, 549 . 551 [RFC3503] Melnikov, A., "Message Disposition Notification (MDN) 552 profile for Internet Message Access Protocol (IMAP)", 553 RFC 3503, DOI 10.17487/RFC3503, March 2003, 554 . 556 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 557 DOI 10.17487/RFC5322, October 2008, 558 . 560 [RFC8098] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition 561 Notification", STD 85, RFC 8098, DOI 10.17487/RFC8098, 562 February 2017, . 564 [RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application 565 Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 566 2019, . 568 [RFC8621] Jenkins, N. and C. Newman, "The JSON Meta Application 569 Protocol (JMAP) for Mail", RFC 8621, DOI 10.17487/RFC8621, 570 August 2019, . 572 6.2. Informative References 574 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 575 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 576 May 2017, . 578 Author's Address 580 Raphael Ouazana (editor) 581 Linagora 582 100 Terrasse Boieldieu - Tour Franklin 583 Paris - La Defense CEDEX 92042 584 France 586 Email: rouazana@linagora.com 587 URI: https://www.linagora.com