SafeSender
A trusted sender whose mail is not moved to the Junk folder.
This object can be configured from the WebUI under Account › Filters & Auto-Replies › Safe Senders
Fields
Section titled “Fields”address
Section titled “address”Type:
String· read-only · max length: 255Email address, or a domain written as @example.org, which also covers its subdomains
JMAP API
Section titled “JMAP API”The SafeSender object is available via the urn:stalwart:jmap capability.
x:SafeSender/get
Section titled “x:SafeSender/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysSafeSenderGet permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SafeSender/get", { "ids": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:SafeSender/set
Section titled “x:SafeSender/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, destroy.
Create
Section titled “Create”This operation requires the sysSafeSenderCreate permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SafeSender/set", { "create": { "new1": {} } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Destroy
Section titled “Destroy”This operation requires the sysSafeSenderDestroy permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SafeSender/set", { "destroy": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:SafeSender/query
Section titled “x:SafeSender/query”This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysSafeSenderQuery permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SafeSender/query", { "filter": { "address": "example" } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'The x:SafeSender/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):
| Condition | Kind |
|---|---|
address | text |
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get SafeSender id1Create
Section titled “Create”stalwart-cli create SafeSenderstalwart-cli query SafeSenderstalwart-cli query SafeSender --where address=exampleDelete
Section titled “Delete”stalwart-cli delete SafeSender --ids id1