[
RFC 8621] defines the Email/get method for retrieving message-specific information. This document defines the following pseudo values in the
properties argument:
-
smimeStatus:
-
If "smimeStatus" is included in the list of requested properties, it MUST be interpreted by the server as a request to return the "smimeStatus" response property.
-
smimeStatusAtDelivery:
-
If "smimeStatusAtDelivery" is included in the list of requested properties, it MUST be interpreted by the server as a request to return the "smimeStatusAtDelivery" response property. (It is effectively the same as the "smimeStatus" value calculated at the date/time of delivery, as specified by "receivedAt".)
-
smimeErrors:
-
If "smimeErrors" is included in the list of requested properties, it MUST be interpreted by the server as a request to return the "smimeErrors" response property.
-
smimeVerifiedAt:
-
If "smimeVerifiedAt" is included in the list of requested properties, it MUST be interpreted by the server as a request to return the "smimeVerifiedAt" response property.
The "smimeStatus" response property is defined as follows:
-
smimeStatus:
-
"String|null" (server-set). null signifies that the message doesn't contain any signature. Otherwise, this property contains the S/MIME signature and certificate verification status calculated according to [RFC 8551], [RFC 8550], and [RFC 5280]. Possible string values of the property are listed below. Servers MAY return other values not defined below, as defined in extensions to this document. Clients MUST treat unrecognized values as "unknown" or "signed/failed". Note that the value of this property might change over time.
-
unknown:
-
An S/MIME message, but it was neither signed nor encrypted. This can also be returned for a multipart/signed message that contains an unrecognized signing protocol (for example, OpenPGP).
-
signed:
-
An S/MIME signed message, but the signature was not yet verified. Some servers might not attempt to verify a signature until a particular message is requested by the client. (This is a useful optimization for a JMAP server to avoid doing work until exact information is needed. A JMAP client that only needs to display an icon that signifies presence of an S/MIME signature can still use this value.) JMAP servers compliant with this document SHOULD attempt signature verification and return "signed/verified" or "signed/failed" instead of this signature status.
-
signed/verified:
-
An S/MIME signed message, and the sender's signature was successfully verified according to [RFC 8551] and [RFC 8550]. Additionally, the signer email address extracted from the S/MIME certificate matches the From header field value, and the signer certificate SHOULD be checked for revocation.
-
signed/failed:
-
S/MIME signed message, but the signature failed to verify according to [RFC 8551] and [RFC 8550]. This might be because of a policy-related decision (e.g., the message signer email address doesn't match the From header field value), the message was modified, the signer's certificate has expired or was revoked, etc.
-
encrypted+signed/verified:
-
This value is reserved for future use. It is typically handled in the same way as "signed/verified".
-
encrypted+signed/failed:
-
This value is reserved for future use. It is typically handled in the same way as "signed/failed".
The "smimeStatusAtDelivery" response property has the same syntax as "smimeStatus" but is calculated in relationship to the "receivedAt" date/time. Unlike "smimeStatus", the "smimeStatusAtDelivery" response property value doesn't change unless trust anchors are added. (For example, addition of a trust anchor can change the value of a message "smimeStatusAtDelivery" property from "signed/failed" to "signed/verified". Note that trust anchor removal doesn't affect this response property.) The "smimeStatusAtDelivery" response property value allows clients to compare the S/MIME signature verification status at delivery with the current status as returned by "smimeStatus", for example, to help to answer questions like "was the signature valid at the time of delivery?".
Note that the "smimeStatusAtDelivery" response property value doesn't have to be calculated at delivery time. A JMAP server can defer its calculation until it is explicitly requested; however, once it is calculated, its value is remembered for later use.
The "smimeErrors" response property is defined as follows:
-
smimeErrors:
-
"String[]|null" (server-set). null signifies that the message doesn't contain any signature or that there were no errors when verifying the S/MIME signature. (That is, this property is non-null only when the corresponding "smimeStatus" response property value is "signed/failed" or "encrypted+signed/failed". Note that future extensions to this document can specify other "smimeStatus" values that can be used with "smimeErrors".) Each string in the array is a human-readable description (in the language specified in the Content-Language header field, if any) of a problem with the signature, the signing certificate, or the signing certificate chain. (See Section 3.8 of RFC 8620 in regards to how this is affected by the language selection.) In one example, the signing certificate might be expired and the message From email address might not correspond to any of the email addresses in the signing certificate. In another example, the certificate might be expired and the JMAP server might be unable to retrieve a Certificate Revocation List (CRL) for the certificate. In both of these cases, there would be 2 elements in the array.
The "smimeVerifiedAt" response property is defined as follows:
-
smimeVerifiedAt:
-
"UTCDate|null" (server-set). null signifies that the message doesn't contain any S/MIME signature or that there is a signature, but there was no attempt to verify it. (Retrieval of the "smimeStatus" value can be used to distinguish these 2 cases). In all other cases, it is set to the date and time of when the S/MIME signature was most recently verified. Note that a request to fetch "smimeStatus", "smimeStatusAtDelivery", and/or "smimeErrors" would force this response property to be set to a non-null value if an S/MIME signature exists.
The "smimeStatus" and "smimeErrors" values are calculated at the time the corresponding JMAP request is processed (but see below about the effect of result caching), not at the time when the message is generated (according to its Date header field value). In all cases, "smimeVerifiedAt" is set to the time when "smimeStatus" and "smimeErrors" were last updated. As recalculating these values is expensive for the server, they
MAY be cached for up to 24 hours from the moment when they were calculated.
Example 1: Retrieval of minimal information about a message, including its From, Subject, and Date header fields, as well as the S/MIME signature verification status at delivery and date/time when the message was received.
["Email/get", {
"ids": [ "fe123u457" ],
"properties": [ "mailboxIds", "from", "subject", "date",
"smimeStatusAtDelivery", "receivedAt" ]
}, "#1"]
This might result in the following response:
[["Email/get", {
"accountId": "abc",
"state": "51234123231",
"list": [
{
"id": "fe123u457",
"mailboxIds": { "f123": true },
"from": [{"name": "Joe Bloggs",
"email": "joe@bloggs.example.net"}],
"subject": "Dinner tonight?",
"date": "2020-07-07T14:12:00Z",
"smimeStatusAtDelivery": "signed/verified",
"receivedAt": "2020-07-07T14:15:18Z"
}
]
}, "#1"]]
Example 2: Retrieval of minimal information about a message, including its From, Subject, and Date header fields, as well as the latest S/MIME signature verification status, S/MIME verification errors (if any), and when the S/MIME signature status was last verified. The response contains 2 S/MIME errors related to S/MIME signature verification.
["Email/get", {
"ids": [ "ag123u123" ],
"properties": [ "mailboxIds", "from", "subject", "date",
"smimeStatus", "smimeErrors", "smimeVerifiedAt" ]
}, "#1"]
This might result in the following response:
[["Email/get", {
"accountId": "abc",
"state": "47234123231",
"list": [
{
"id": "ag123u123",
"mailboxIds": { "f123": true },
"from": [{"name": "Jane Doe",
"email": "jdoe@example.com"}],
"subject": "Company takeover",
"date": "2020-01-31T23:00:00Z",
"smimeStatus": "signed/failed",
"smimeErrors": [
"From email address doesn't match the certificate",
"Can't retrieve CRL from the CRL URL"],
"smimeVerifiedAt": "2020-03-01T12:11:19Z"
}
]
}, "#1"]]
Future extensions to this document can specify extra allowed values for the "smimeStatus" response property. All values (defined in this document or in extensions to this document)
MUST be in ASCII. (Note that this response property contains tokens; thus, it is not subject to internationalization or localization).
New "smimeStatus" response property values defined in extensions may affect the behavior of properties, such as the "smimeErrors" response property of Email/get (see
Section 4.1) or the "hasVerifiedSmime" property of Email/query (see
Section 4.2). In particular, the new values can be treated similarly to values defined in this document.
For example, a putative JMAP extension for automatically decrypting S/MIME messages can specify two additional values, one specifying that a message is both encrypted and signed with a valid S/MIME signature (e.g. "encrypted+signed/verified") and another one specifying that a message is both encrypted and signed with an invalid S/MIME signature (e.g. "encrypted+signed/failed"). The former value can be treated as "signed/verified" (and would thus affect "hasVerifiedSmime") and the latter can be treated as "signed/failed" (and thus can be used with "smimeErrors").