idnits 2.17.1 draft-ietf-jmap-mdn-15.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 27, 2020) is 1368 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: 0 errors (**), 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 July 27, 2020 5 Expires: January 28, 2021 7 Handling Message Disposition Notification with JMAP 8 draft-ietf-jmap-mdn-15 10 Abstract 12 This document specifies a data model for handling Message Disposition 13 Notifications (MDNs, RFC 8098) in the JSON Meta Application Protocol 14 (JMAP, RFCs 8620 and 8621). 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at https://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on January 28, 2021. 33 Copyright Notice 35 Copyright (c) 2020 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (https://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 1.1. Notational conventions . . . . . . . . . . . . . . . . . 3 52 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 53 1.3. Addition to the capabilities object . . . . . . . . . . . 3 54 2. MDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 55 2.1. MDN/send . . . . . . . . . . . . . . . . . . . . . . . . 5 56 2.2. MDN/parse . . . . . . . . . . . . . . . . . . . . . . . . 7 57 3. Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 58 3.1. Sending an MDN for a received email message . . . . . . . 8 59 3.2. Asking for MDN when sending an email message . . . . . . 9 60 3.3. Parsing a received MDN . . . . . . . . . . . . . . . . . 10 61 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 62 4.1. JMAP Capability Registration for "mdn" . . . . . . . . . 11 63 4.2. JMAP Error Codes Registry . . . . . . . . . . . . . . . . 12 64 5. Security considerations . . . . . . . . . . . . . . . . . . . 12 65 6. Normative References . . . . . . . . . . . . . . . . . . . . 12 66 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 13 68 1. Introduction 70 JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic 71 protocol for synchronising data, such as mail, calendars or contacts, 72 between a client and a server. It is optimised for mobile and web 73 environments, and provides a consistent interface to different data 74 types. 76 JMAP for Mail ([RFC8621] - The JSON Meta Application Protocol (JMAP) 77 for Mail) specifies a data model for synchronising email data with a 78 server using JMAP. Clients can use this to efficiently search, 79 access, organise, and send messages. 81 Message Disposition Notifications (MDNs) are defined in [RFC8098] and 82 are used as "read receipts", "acknowledgements", or "receipt 83 notifications". 85 A client can have to deal with MDNs in different ways: 87 1. When receiving an email message, an MDN can be sent to the 88 sender. This specification defines an MDN/send method to cover 89 this case. 91 2. When sending an email message, an MDN can be requested. This 92 must be done with the help of a header, and is already specified 93 by [RFC8098] and can already be handled by [RFC8621] this way. 95 3. When receiving an MDN, the MDN could be related to an existing 96 sent message. This is already covered by [RFC8621] in the 97 EmailSubmission object. A client might want to display detailed 98 information about a received MDN. This specification defines an 99 MDN/parse method to cover this case. 101 1.1. Notational conventions 103 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 104 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 105 "OPTIONAL" in this document are to be interpreted as described in BCP 106 14 [RFC2119] [RFC8174] when, and only when, they appear in all 107 capitals, as shown here. 109 Type signatures, examples and property descriptions in this document 110 follow the conventions established in section 1.1 of [RFC8620]. Data 111 types defined in the core specification are also used in this 112 document. 114 Servers MUST support all properties specified for the new data types 115 defined in this document. 117 1.2. Terminology 119 The same terminology is used in this document as in the core JMAP 120 specification. 122 Because keywords are case-insensitive in IMAP but case-sensitive in 123 JMAP, the "$mdnsent" keyword MUST always be used in lowercase. 125 1.3. Addition to the capabilities object 127 Capabilities are announced as part of the standard JMAP Session 128 resource; see [RFC8620], section 2. This defines a new capability, 129 "urn:ietf:params:jmap:mdn". 131 The capability "urn:ietf:params:jmap:mdn" being present in the 132 "accountCapabilities" property of an account represents support for 133 the "MDN" data type, parsing MDNs via the "MDN/parse" method, and 134 creating and sending MDN messages via the "MDN/send" method. Servers 135 that include the capability in one or more "accountCapabilities" 136 properties MUST also include the property in the "capabilities" 137 property. 139 The value of this "urn:ietf:params:jmap:mdn" property is an empty 140 object in the account's "accountCapabilities" property. 142 2. MDN 144 An *MDN* object has the following properties: 146 o forEmailId: "Id|null" Email Id of the received message this MDN is 147 relative to. This property MUST NOT be null for "MDN/send", but 148 may be null in the response from the "MDN/parse" method. 150 o subject: "String|null" Subject used as "Subject" header for this 151 MDN. 153 o textBody: "String|null" Human readable part of the MDN, as plain 154 text. 156 o includeOriginalMessage: "Boolean" (default: false). If "true", 157 the content of the original message will appear in the third 158 component of the multipart/report generated for the MDN. See 159 [RFC8098] for details and security considerations. 161 o reportingUA: "String|null" Name of the MUA creating this MDN. It 162 is used to build the MDN Report part of the MDN. 164 o disposition: "Disposition" Object containing the diverse MDN 165 disposition options. 167 o mdnGateway: "String|null" (server-set) Name of the gateway or MTA 168 that translated a foreign (non-Internet) message disposition 169 notification into this MDN. 171 o originalRecipient: "String|null" (server-set) Original recipient 172 address as specified by the sender of the message for which the 173 MDN is being issued. 175 o finalRecipient: "String|null" Recipient for which the MDN is being 176 issued. if set, it overrides the value that would be calculated 177 by the server from the Identity. 179 o originalMessageId: "String|null" (server-set) Message-ID (the 180 [RFC5322] header field, not the JMAP Id) of the message for which 181 the MDN is being issued. 183 o error: "String[]|null" (server-set) Additional information in the 184 form of text messages when the "error" disposition modifier 185 appears. 187 o extensionFields: "String[String]|null" Object where keys are 188 extension-field names and values are extension-field values. 190 A *Disposition* object has the following properties: 192 o actionMode: "String" This MUST be one of the following strings: 193 "manual-action" / "automatic-action" 195 o sendingMode: "String" This MUST be one of the following strings: 196 "mdn-sent-manually" / "mdn-sent-automatically" 198 o type: "String" This MUST be one of the following strings: 199 "deleted" / "dispatched" / "displayed" / "processed" 201 See [RFC8098] for the exact meaning of these different fields. These 202 fields are defined case insensitive in [RFC8098] but are case 203 sensitive in this RFC and MUST be converted to lowercase by "MDN/ 204 parse". 206 2.1. MDN/send 208 The MDN/send method sends an [RFC5322] message from an MDN object. 209 When calling this method the "using" property of the Request object 210 MUST contain the capabilities "urn:ietf:params:jmap:mdn" and 211 "urn:ietf:params:jmap:mail". The latter because of the implicit call 212 to Email/set and the use of Identities, described below. The method 213 takes the following arguments: 215 o accountId: "Id" The id of the account to use. 217 o identityId: "Id" The id of the Identity to associate with these 218 MDNs. The server will use this identity to define the sender of 219 the MDNs and to set the finalRecipient field. 221 o send: "Id[MDN]" A map of creation id (client specified) to MDN 222 objects. 224 o onSuccessUpdateEmail: "Id[PatchObject]|null" A map of id to an 225 object containing properties to update on the Email object 226 referenced by the "MDN/send" if the sending succeeds. This will 227 always be a backward reference to the creation id (see example 228 below in Section 3.1). 230 The response has the following arguments: 232 o accountId: "Id" The id of the account used for the call. 234 o sent: "Id[MDN]|null" A map of creation id to MDN containing any 235 properties that were not set by the client. This includes any 236 properties that were omitted by the client and thus set to a 237 default by the server. This argument is null if no MDN objects 238 were successfully sent. 240 o notSent: "Id[SetError]|null" A map of the creation id to a 241 SetError object for each record that failed to be sent, or null if 242 all successful. 244 The following already registered SetError would mean: 246 o notFound: The reference Email Id cannot be found, or has no valid 247 "Disposition-Notification-To" header. 249 o forbidden: MDN/send would violate an ACL or other permissions 250 policy. 252 o forbiddenFrom: The user is not allowed to use the given 253 finalRecipient property. 255 o overQuota: MDN/send would exceed a server-defined limit on the 256 number or total size of sent MDNs. It could include limitations 257 on sent messages. 259 o tooLarge: MDN/send would result in an MDN that exceeds a server- 260 defined limit for the maximum size of an MDN, or more generally on 261 email message. 263 o rateLimit: Too many MDNs or email messages have been created 264 recently, and a server-defined rate limit has been reached. It 265 may work if tried again later. 267 o invalidProperties: The record given is invalid in some way. 269 The following is a new SetError: 271 o mdnAlreadySent: The message has the "$mdnsent" keyword already 272 set. 274 If the accountId or identityId given cannot be found, the method call 275 is rejected with an "invalidArguments" error. 277 The client MUST NOT issue an MDN/send request if the message has the 278 "$mdnsent" keyword set. 280 When sending the MDN, the server is in charge of generating the 281 "originalRecipient", "finalRecipient" and "originalMessageId" fields 282 according to the [RFC8098] specification. 284 The client is expected to explicitly update each "Email" for which an 285 "MDN/send" has been invoked in order to set the "$mdnsent" keyword on 286 these messages. To ensure that, the server MUST reject an "MDN/send" 287 which does not result in setting the keyword "$mdnsent". Thus the 288 server MUST check that the "onSuccessUpdateEmail" property of the 289 method is correctly set to update this keyword. 291 2.2. MDN/parse 293 This method allows a client to parse blobs as [RFC5322] messages to 294 get MDN objects. This can be used to parse and get detailed 295 information about blobs referenced in the "mdnBlobIds" of the 296 EmailSubmission object, or any email message the client could expect 297 to be an MDN. 299 The "forEmailId" property can be null or missing if the 300 "originalMessageId" property is missing or does not refer to an 301 existing message, or if the server cannot efficiently calculate the 302 related message (for example, if several messages get the same 303 "Message-Id" header). 305 The MDN/parse method takes the following arguments: 307 o accountId: "Id" The id of the account to use. 309 o blobIds: "Id[]" The ids of the blobs to parse. 311 The response has the following arguments: 313 o accountId: "Id" The id of the account used for the call. 315 o parsed: "Id[MDN]|null" A map of blob id to parsed MDN 316 representation for each successfully parsed blob, or null if none. 318 o notParsable: "Id[]|null" A list of ids given that corresponded to 319 blobs that could not be parsed as MDNs, or null if none. 321 o notFound: "Id[]|null" A list of blob ids given that could not be 322 found, or null if none. 324 The following additional errors may be returned instead of the MDN/ 325 parse response: 327 o requestTooLarge: The number of ids requested by the client exceeds 328 the maximum number the server is willing to process in a single 329 method call. 331 o invalidArguments: If the accountId given cannot be found, the MDN 332 parsing is rejected with an "invalidArguments" error. 334 3. Samples 336 3.1. Sending an MDN for a received email message 338 A client can use the following request to send an MDN back to the 339 sender: 341 [[ "MDN/send", { 342 "accountId": "ue150411c", 343 "identityId": "I64588216", 344 "send": { 345 "k1546": { 346 "forEmailId": "Md45b47b4877521042cec0938", 347 "subject": "Read receipt for: World domination", 348 "textBody": "This receipt shows that the email has been 349 displayed on your recipient's computer. There is no 350 guaranty it has been read or understood.", 351 "reportingUA": "joes-pc.cs.example.com; Foomail 97.1", 352 "disposition": { 353 "actionMode": "manual-action", 354 "sendingMode": "mdn-sent-manually", 355 "type": "displayed" 356 }, 357 "extension": { 358 "X-EXTENSION-EXAMPLE": "example.com" 359 } 360 } 361 }, 362 "onSuccessUpdateEmail": { 363 "#k1546": { 364 "keywords/$mdnsent": true 365 } 366 } 367 }, "0" ]] 369 If the email id matches an existing email message without the 370 "$mdnsent" keyword, the server can answer: 372 [[ "MDN/send", { 373 "accountId": "ue150411c", 374 "sent": { 375 "k1546": { 376 "finalRecipient": "rfc822; john@example.com", 377 "originalMessageId": "<199509192301.23456@example.org>" 378 } 379 } 380 }, "0" ], 381 [ "Email/set", { 382 "accountId": "ue150411c", 383 "oldState": "23", 384 "newState": "42", 385 "updated": { 386 "Md45b47b4877521042cec0938": {} 387 } 388 }, "0" ]] 390 If the "$mdnsent" keyword has already been set, the server can answer 391 an error: 393 [[ "MDN/send", { 394 "accountId": "ue150411c", 395 "notSent": { 396 "k1546": { 397 "type": "mdnAlreadySent", 398 "description" : "$mdnsent keyword is already present" 399 } 400 } 401 }, "0" ]] 403 3.2. Asking for MDN when sending an email message 405 This is done with the [RFC8621] "Email/set" "create" method. 407 [[ "Email/set", { 408 "accountId": "ue150411c", 409 "create": { 410 "k1546": { 411 "mailboxIds": { 412 "2ea1ca41b38e": true 413 }, 414 "keywords": { 415 "$seen": true, 416 "$draft": true 417 }, 418 "from": [{ 419 "name": "Joe Bloggs", 420 "email": "joe@example.com" 421 }], 422 "to": [{ 423 "name": "John", 424 "email": "john@example.com" 425 }], 426 "header:Disposition-Notification-To:asText": "joe@example.com", 427 "subject": "World domination", 428 ... 429 } 430 } 431 }, "0" ]] 433 Note the specified "Disposition-Notification-To" header indicating 434 where to send MDN back (usually the sender of the message). 436 3.3. Parsing a received MDN 438 The client issues a parse request: 440 [[ "MDN/parse", { 441 "accountId": "ue150411c", 442 "blobIds": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 443 }, "0" ]] 445 The server responds: 447 [[ "MDN/parse", { 448 "accountId": "ue150411c", 449 "parsed": { 450 "0f9f65ab-dc7b-4146-850f-6e4881093965": { 451 "forEmailId": "Md45b47b4877521042cec0938", 452 "subject": "Read receipt for: World domination", 453 "textBody": "This receipt shows that the email has been 454 displayed on your recipient's computer. There is no 455 guaranty it has been read or understood.", 456 "reportingUA": "joes-pc.cs.example.com; Foomail 97.1", 457 "disposition": { 458 "actionMode": "manual-action", 459 "sendingMode": "mdn-sent-manually", 460 "type": "displayed" 461 }, 462 "finalRecipient": "rfc822; john@example.com", 463 "originalMessageId": "<199509192301.23456@example.org>" 464 } 465 } 466 }, "0" ]] 468 In case of a not found blobId, the server would respond: 470 [[ "MDN/parse", { 471 "accountId": "ue150411c", 472 "notFound": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 473 }, "0" ]] 475 If the blobId has been found but is not parsable, the server would 476 respond: 478 [[ "MDN/parse", { 479 "accountId": "ue150411c", 480 "notParsable": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 481 }, "0" ]] 483 4. IANA Considerations 485 4.1. JMAP Capability Registration for "mdn" 487 IANA will register the "mdn" JMAP Capability as follows: 489 Capability Name: "urn:ietf:params:jmap:mdn" 491 Specification document: this document 493 Intended use: common 494 Change Controller: IETF 496 Security and privacy considerations: this document, section 5. 498 4.2. JMAP Error Codes Registry 500 This section registers one new error code in the "JMAP Error Codes" 501 registry, as defined in [RFC8620]. 503 JMAP Error Code: mdnAlreadySent 505 Intended use: common 507 Change controller: IETF 509 Reference: This document, Section 2.1 511 Description: The message has the "$mdnsent" keyword already set. The 512 client MUST NOT try again to send an MDN for this message. 514 5. Security considerations 516 The same considerations regarding MDN (see [RFC8098] and [RFC3503]) 517 apply to this document. 519 In order to enforce trust regarding the relation between the user 520 sending an email message and the identity of this user, the server 521 SHOULD validate in conformance to the provided Identity that the user 522 is permitted to use the finalRecipient value and return a 523 forbiddenFrom error if not. 525 6. Normative References 527 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 528 Requirement Levels", BCP 14, RFC 2119, 529 DOI 10.17487/RFC2119, March 1997, 530 . 532 [RFC3503] Melnikov, A., "Message Disposition Notification (MDN) 533 profile for Internet Message Access Protocol (IMAP)", 534 RFC 3503, DOI 10.17487/RFC3503, March 2003, 535 . 537 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 538 DOI 10.17487/RFC5322, October 2008, 539 . 541 [RFC8098] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition 542 Notification", STD 85, RFC 8098, DOI 10.17487/RFC8098, 543 February 2017, . 545 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 546 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 547 May 2017, . 549 [RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application 550 Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 551 2019, . 553 [RFC8621] Jenkins, N. and C. Newman, "The JSON Meta Application 554 Protocol (JMAP) for Mail", RFC 8621, DOI 10.17487/RFC8621, 555 August 2019, . 557 Author's Address 559 Raphael Ouazana (editor) 560 Linagora 561 100 Terrasse Boieldieu - Tour Franklin 562 Paris - La Defense CEDEX 92042 563 France 565 Email: rouazana@linagora.com 566 URI: https://www.linagora.com