An
MDN object has the following properties:
-
forEmailId: Id|null
The Email id of the received message to which this MDN is related. This property MUST NOT be null for "MDN/send" but MAY be null in the response from the "MDN/parse" method.
-
subject: String|null
The subject used as "Subject" header field for this MDN.
-
textBody: String|null
The human-readable part of the MDN, as plain text.
-
includeOriginalMessage: Boolean (default: false)
If true, the content of the original message will appear in the third component of the multipart/report generated for the MDN. See [RFC 8098] for details and security considerations.
-
reportingUA: String|null
The name of the Mail User Agent (MUA) creating this MDN. It is used to build the MDN report part of the MDN. Note that a null value may have better privacy properties.
-
disposition: Disposition
The object containing the diverse MDN disposition options.
-
mdnGateway: String|null (server-set)
The name of the gateway or Message Transfer Agent (MTA) that translated a foreign (non-Internet) message disposition notification into this MDN.
-
originalRecipient: String|null (server-set)
The original recipient address as specified by the sender of the message for which the MDN is being issued.
-
finalRecipient: String|null
The recipient for which the MDN is being issued. If set, it overrides the value that would be calculated by the server from the Identity defined in the "MDN/send" method, unless explicitly set by the client.
-
originalMessageId: String|null (server-set)
The "Message-ID" header field [RFC 5322] (not the JMAP id) of the message for which the MDN is being issued.
-
error: String[]|null (server-set)
Additional information in the form of text messages when the "error" disposition modifier appears.
-
extensionFields: String[String]|null
The object where keys are extension-field names, and values are extension-field values (see RFC 8098, Section 3.3).
A
Disposition object has the following properties:
-
actionMode: String
This MUST be one of the following strings: manual-action / automatic-action
-
sendingMode: String
This MUST be one of the following strings: mdn-sent-manually / mdn-sent-automatically
-
type: String
This MUST be one of the following strings: deleted / dispatched / displayed / processed
See [
RFC 8098] for the exact meaning of these different fields. These fields are defined as case insensitive in [
RFC 8098] but are case sensitive in this RFC and
MUST be converted to lowercase by "MDN/parse".
The "MDN/send" method sends a message in the style of [
RFC 5322] from an MDN object. When calling this method, the "using" property of the Request object
MUST contain the capabilities "urn:ietf:params:jmap:mdn" and "urn:ietf:params:jmap:mail"; the latter because of the implicit call to "Email/set" and the use of Identity objects, which is described below. The method takes the following arguments:
-
accountId: Id
The id of the account to use.
-
identityId: Id
The id of the Identity to associate with these MDNs. The server will use this identity to define the sender of the MDNs and to set the "finalRecipient" field.
-
send: Id[MDN]
A map of the creation id (client specified) to MDN objects.
-
onSuccessUpdateEmail: Id[PatchObject]|null
A map of the id to an object containing properties to update on the Email object referenced by the "MDN/send" if the sending succeeds. This will always be a backward reference to the creation id (see the example below in Section 3.1).
The response has the following arguments:
-
accountId: Id
The id of the account used for the call.
-
sent: Id[MDN]|null
A map of the creation id to an MDN containing any properties that were not set by the client. This includes any properties that were omitted by the client and thus set to a default by the server. This argument is null if no MDN objects were successfully sent.
-
notSent: Id[SetError]|null
A map of the creation id to a SetError object for each record that failed to be sent or null if all successful.
In this context, the existing SetError types defined in [
RFC 8620] and [
RFC 8621] are interpreted as follows:
-
notFound:
-
The reference "forEmailId" cannot be found or has no valid "Disposition-Notification-To" header field.
-
forbidden:
-
"MDN/send" would violate an Access Control List (ACL) or other permissions policy.
-
forbiddenFrom:
-
The user is not allowed to use the given "finalRecipient" property.
-
overQuota:
-
"MDN/send" would exceed a server-defined limit on the number or total size of sent MDNs. It could include limitations on sent messages.
-
tooLarge:
-
"MDN/send" would result in an MDN that exceeds a server-defined limit for the maximum size of an MDN or more generally, on email message.
-
rateLimit:
-
Too many MDNs or email messages have been created recently, and a server-defined rate limit has been reached. It may work if tried again later.
-
invalidProperties:
-
The record given is invalid in some way.
The following is a new SetError:
-
mdnAlreadySent:
-
The message has the $mdnsent keyword already set.
If the "accountId" or "identityId" given cannot be found, the method call is rejected with an
invalidArguments error.
The client
MUST NOT issue an "MDN/send" request if the message has the
$mdnsent keyword set.
When sending the MDN, the server is in charge of generating the "originalRecipient" and "originalMessageId" fields according to [
RFC 8098]. "finalRecipient" will also generally be generated by the server based on the provided identity, but if specified by the client and allowed (see
Section 5), the server will use the client-provided value.
The client is expected to explicitly update each "Email" for which an "MDN/send" has been invoked in order to set the
$mdnsent keyword on these messages. To ensure that, the server
MUST reject an "MDN/send" that does not result in setting the keyword
$mdnsent. Thus, the server
MUST check that the "onSuccessUpdateEmail" property of the method is correctly set to update this keyword.
This method allows a client to parse blobs as messages in the style of [
RFC 5322] to get MDN objects. This can be used to parse and get detailed information about blobs referenced in the "mdnBlobIds" of the EmailSubmission object or any email message the client could expect to be an MDN.
The "forEmailId" property can be null or missing if the "originalMessageId" property is missing or does not refer to an existing message or if the server cannot efficiently calculate the related message (for example, if several messages get the same "Message-ID" header field).
The "MDN/parse" method takes the following arguments:
-
accountId: Id
The id of the account to use.
-
blobIds: Id[]
The ids of the blobs to parse.
The response has the following arguments:
-
accountId: Id
The id of the account used for the call.
-
parsed: Id[MDN]|null
A map of the blob id to a parsed MDN representation for each successfully parsed blob or null if none.
-
notParsable: Id[]|null
A list of ids given that corresponds to blobs that could not be parsed as MDNs or null if none.
-
notFound: Id[]|null
A list of blob ids given that could not be found or null if none.
The following additional errors may be returned instead of the "MDN/parse" response:
-
requestTooLarge:
-
The number of ids requested by the client exceeds the maximum number the server is willing to process in a single method call.
-
invalidArguments:
-
If the given "accountId" cannot be found, the MDN parsing is rejected with an invalidArguments error.