Action
Action
Section titled “Action”Defines server management actions such as reloads, troubleshooting and cache operations.
This object can be configured from the WebUI under Management › Actions
Fields
Section titled “Fields”Action is a multi-variant object: each instance has an @type discriminator selecting one of the variants below, and each variant carries its own set of fields.
@type: "ReloadSettings"
Section titled “@type: "ReloadSettings"”Reload: Server settings
@type: "ReloadTlsCertificates"
Section titled “@type: "ReloadTlsCertificates"”Reload: TLS certificates
@type: "ReloadLookupStores"
Section titled “@type: "ReloadLookupStores"”Reload: Lookup stores
@type: "ReloadBlockedIps"
Section titled “@type: "ReloadBlockedIps"”Reload: Blocked IPs list
@type: "UpdateApps"
Section titled “@type: "UpdateApps"”Application Management: Update applications
@type: "TroubleshootDmarc"
Section titled “@type: "TroubleshootDmarc"”DMARC: Troubleshooting
remoteIp
Section titled “remoteIp”Type:
IpAddr· requiredRemote IP address of the SMTP client
ehloDomain
Section titled “ehloDomain”Type:
String· requiredEHLO domain provided by the SMTP client
mailFrom
Section titled “mailFrom”Type:
EmailAddress· requiredMAIL FROM address provided by the SMTP client
message
Section titled “message”Type:
Text?Body of the email message used for DMARC troubleshooting, if applicable
spfEhloDomain
Section titled “spfEhloDomain”Type:
String· requiredDomain used for SPF check based on EHLO domain
spfEhloResult
Section titled “spfEhloResult”Type:
DmarcTroubleshootAuthResult· server-setResult of the SPF check based on EHLO domain
spfMailFromDomain
Section titled “spfMailFromDomain”Type:
String· requiredDomain used for SPF check based on MAIL FROM address
spfMailFromResult
Section titled “spfMailFromResult”Type:
DmarcTroubleshootAuthResult· server-setResult of the SPF check based on MAIL FROM address
ipRevResult
Section titled “ipRevResult”Type:
DmarcTroubleshootAuthResult· server-setResult of the reverse DNS check for the remote IP address
ipRevPtr
Section titled “ipRevPtr”Type:
String[]· server-setPTR records returned by the reverse DNS lookup for the remote IP address
dkimResults
Section titled “dkimResults”Type:
DmarcTroubleshootAuthResult[]· server-setResults of the DKIM signature verification checks
dkimPass
Section titled “dkimPass”Type:
Boolean· server-set · default:falseWhether the DKIM checks passed
arcResult
Section titled “arcResult”Type:
DmarcTroubleshootAuthResult· server-setResult of the ARC validation check
dmarcResult
Section titled “dmarcResult”Type:
DmarcTroubleshootAuthResult· server-setResult of the DMARC check
dmarcPass
Section titled “dmarcPass”Type:
Boolean· server-set · default:falseWhether the DMARC check passed
dmarcPolicy
Section titled “dmarcPolicy”Type:
DmarcDisposition· server-setDMARC policy applied to the email message
elapsed
Section titled “elapsed”Type:
Duration· server-set · default:"0ms"Time taken to perform the DMARC troubleshooting
@type: "ClassifySpam"
Section titled “@type: "ClassifySpam"”Spam Filter: Classify a message
message
Section titled “message”Type:
Text· requiredRaw email message to classify for spam
remoteIp
Section titled “remoteIp”Type:
IpAddr· requiredRemote IP address of the SMTP client
ehloDomain
Section titled “ehloDomain”Type:
String· requiredEHLO domain provided by the SMTP client
authenticatedAs
Section titled “authenticatedAs”Type:
String?Authentication identity of the SMTP client, if authenticated
Type:
Boolean· default:trueWhether the SMTP connection is secured with TLS
envFrom
Section titled “envFrom”Type:
EmailAddress· requiredMAIL FROM address provided by the SMTP client
envFromParameters
Section titled “envFromParameters”Type:
SpamClassifyParameters?Parameters related to the MAIL FROM address
envRcptTo
Section titled “envRcptTo”Type:
EmailAddress[]List of RCPT TO addresses provided by the SMTP client
Type:
Float· server-set · default:0Spam score for the classified message
Type:
Map<String,SpamClassifyTag>· server-setList of tags contributing to the spam classification of the message
result
Section titled “result”Type:
SpamClassifyResult· server-setOverall spam classification result for the message
@type: "InvalidateCaches"
Section titled “@type: "InvalidateCaches"”Cache: Invalidate all caches
@type: "InvalidateNegativeCaches"
Section titled “@type: "InvalidateNegativeCaches"”Cache: Invalidate negative caches
@type: "PauseMtaQueue"
Section titled “@type: "PauseMtaQueue"”MTA: Pause queue processing
@type: "ResumeMtaQueue"
Section titled “@type: "ResumeMtaQueue"”MTA: Resume queue processing
JMAP API
Section titled “JMAP API”The Action object is available via the urn:stalwart:jmap capability.
x:Action/get
Section titled “x:Action/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysActionGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Action/get", { "ids": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:Action/set
Section titled “x:Action/set”This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
Supports create, update, and destroy operations in a single call.
Create
Section titled “Create”This operation requires the sysActionCreate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Action/set", { "create": { "new1": { "@type": "ReloadSettings" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Update
Section titled “Update”This operation requires the sysActionUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Action/set", { "update": { "id1": { "description": "updated value" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Destroy
Section titled “Destroy”This operation requires the sysActionDestroy permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Action/set", { "destroy": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:Action/query
Section titled “x:Action/query”This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysActionQuery permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Action/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 Action id1Create
Section titled “Create”stalwart-cli create Action/ReloadSettingsstalwart-cli query ActionUpdate
Section titled “Update”stalwart-cli update Action id1 --field description='updated value'Delete
Section titled “Delete”stalwart-cli delete Action --ids id1Nested types
Section titled “Nested types”DmarcTroubleshootAuthResult
Section titled “DmarcTroubleshootAuthResult”Authentication check result for DMARC troubleshooting.
Pass: Pass. No additional fields.Fail: Fail. Carries the fields ofDmarcTroubleshootDetails.SoftFail: SoftFail. Carries the fields ofDmarcTroubleshootDetails.TempError: TempError. Carries the fields ofDmarcTroubleshootDetails.PermError: PermError. Carries the fields ofDmarcTroubleshootDetails.Neutral: Neutral. Carries the fields ofDmarcTroubleshootDetails.None: None. No additional fields.
DmarcTroubleshootDetails
Section titled “DmarcTroubleshootDetails”Details for a failed authentication check.
details
Section titled “details”Type:
String?· server-setAuthentication result details
SpamClassifyTag
Section titled “SpamClassifyTag”A tag and score contributing to spam classification.
Type:
Float· server-set · default:0Score associated with the tag
disposition
Section titled “disposition”Type:
SpamClassifyTagDisposition· server-setDisposition associated with the tag
DmarcDisposition
Section titled “DmarcDisposition”| Value | Label |
|---|---|
none | No specific action requested |
quarantine | Treat failing messages as suspicious |
reject | Reject failing messages |
unspecified | Disposition not specified |
SpamClassifyParameters
Section titled “SpamClassifyParameters”| Value | Label |
|---|---|
bit7 | 7-bit message content |
bit8Mime - 8-bit MIME message content | bit8Mime - 8-bit MIME message content |
binaryMime | Binary MIME message content |
smtpUtf8 | UTF-8 message content |
SpamClassifyTagDisposition
Section titled “SpamClassifyTagDisposition”| Value | Label |
|---|---|
score | Assign the tag’s score to the overall spam score |
reject | Reject the message |
discard | Discard the message |
SpamClassifyResult
Section titled “SpamClassifyResult”| Value | Label |
|---|---|
spam | Classify as spam |
ham | Classify as non-spam (ham) |
reject | Reject message |
discard | Discard message |