SmimeTrustAnchor
Additional certificate authority trusted when validating recipient S/MIME certificates.
This object can be configured from the WebUI under Settings › Encryption › Trust Anchors
Fields
Section titled “Fields”description
Section titled “description”Type:
String· requiredDescription of the certificate authority
certificate
Section titled “certificate”Type:
Text· requiredCA certificate in PEM format
enable
Section titled “enable”Type:
Boolean· default:trueWhether the certificate authority is trusted
subject
Section titled “subject”Type:
String· server-setSubject of the CA certificate, taken from the certificate itself
expiresAt
Section titled “expiresAt”Type:
UTCDateTime· server-setExpiration date of the CA certificate, taken from the certificate itself
JMAP API
Section titled “JMAP API”The SmimeTrustAnchor object is available via the urn:stalwart:jmap capability.
x:SmimeTrustAnchor/get
Section titled “x:SmimeTrustAnchor/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysSmimeTrustAnchorGet permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SmimeTrustAnchor/get", { "ids": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:SmimeTrustAnchor/set
Section titled “x:SmimeTrustAnchor/set”This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
Supports the following operations in a single call: create, update, destroy.
Create
Section titled “Create”This operation requires the sysSmimeTrustAnchorCreate permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SmimeTrustAnchor/set", { "create": { "new1": { "certificate": "Example", "description": "Example" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Update
Section titled “Update”This operation requires the sysSmimeTrustAnchorUpdate permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SmimeTrustAnchor/set", { "update": { "id1": { "description": "updated value" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Destroy
Section titled “Destroy”This operation requires the sysSmimeTrustAnchorDestroy permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SmimeTrustAnchor/set", { "destroy": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:SmimeTrustAnchor/query
Section titled “x:SmimeTrustAnchor/query”This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysSmimeTrustAnchorQuery permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SmimeTrustAnchor/query", { "filter": {} }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get SmimeTrustAnchor id1Create
Section titled “Create”stalwart-cli create SmimeTrustAnchor \ --field description=Example \ --field certificate=Examplestalwart-cli query SmimeTrustAnchorUpdate
Section titled “Update”stalwart-cli update SmimeTrustAnchor id1 --field description='updated value'Delete
Section titled “Delete”stalwart-cli delete SmimeTrustAnchor --ids id1