Action
Defines server management actions such as reloads, troubleshooting and cache operations.
This object can be configured from the WebUI under Management › Actions
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"
Reload: Server settings
@type: "ReloadTlsCertificates"
Reload: TLS certificates
@type: "ReloadLookupStores"
Reload: Lookup stores
@type: "ReloadBlockedIps"
Reload: Blocked IPs list
@type: "UpdateApps"
Application Management: Update applications
@type: "TroubleshootDmarc"
DMARC: Troubleshooting
remoteIp
Type:
IpAddr· requiredRemote IP address of the SMTP client
ehloDomain
Type:
String· requiredEHLO domain provided by the SMTP client
mailFrom
Type:
EmailAddress· requiredMAIL FROM address provided by the SMTP client
message
Type:
Text?Body of the email message used for DMARC troubleshooting, if applicable
spfEhloDomain
Type:
String· requiredDomain used for SPF check based on EHLO domain
spfEhloResult
Type:
DmarcTroubleshootAuthResult· server-setResult of the SPF check based on EHLO domain
spfMailFromDomain
Type:
String· requiredDomain used for SPF check based on MAIL FROM address
spfMailFromResult
Type:
DmarcTroubleshootAuthResult· server-setResult of the SPF check based on MAIL FROM address
ipRevResult
Type:
DmarcTroubleshootAuthResult· server-setResult of the reverse DNS check for the remote IP address
ipRevPtr
Type:
String[]· server-setPTR records returned by the reverse DNS lookup for the remote IP address
dkimResults
Type:
DmarcTroubleshootAuthResult[]· server-setResults of the DKIM signature verification checks
dkimPass
Type:
Boolean· server-set · default:falseWhether the DKIM checks passed
arcResult
Type:
DmarcTroubleshootAuthResult· server-setResult of the ARC validation check
dmarcResult
Type:
DmarcTroubleshootAuthResult· server-setResult of the DMARC check
dmarcPass
Type:
Boolean· server-set · default:falseWhether the DMARC check passed
dmarcPolicy
Type:
DmarcDisposition· server-setDMARC policy applied to the email message
elapsed
Type:
Duration· server-set · default:"0ms"Time taken to perform the DMARC troubleshooting
@type: "ClassifySpam"
Spam Filter: Classify a message
message
Type:
Text· requiredRaw email message to classify for spam
remoteIp
Type:
IpAddr· requiredRemote IP address of the SMTP client
ehloDomain
Type:
String· requiredEHLO domain provided by the SMTP client
authenticatedAs
Type:
String?Authentication identity of the SMTP client, if authenticated
isTls
Type:
Boolean· default:trueWhether the SMTP connection is secured with TLS
envFrom
Type:
EmailAddress· requiredMAIL FROM address provided by the SMTP client
envFromParameters
Type:
SpamClassifyParameters?Parameters related to the MAIL FROM address
envRcptTo
Type:
EmailAddress[]List of RCPT TO addresses provided by the SMTP client
score
Type:
Float· server-set · default:0Spam score for the classified message
tags
Type:
Map<String,SpamClassifyTag>· server-setList of tags contributing to the spam classification of the message
result
Type:
SpamClassifyResult· server-setOverall spam classification result for the message
@type: "InvalidateCaches"
Cache: Invalidate all caches
@type: "InvalidateNegativeCaches"
Cache: Invalidate negative caches
@type: "PauseMtaQueue"
MTA: Pause queue processing
@type: "ResumeMtaQueue"
MTA: Resume queue processing
JMAP API
The Action object is available via the urn:stalwart:jmap capability.
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
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
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
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": {
"id": "id1"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
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
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"
]
}'
CLI
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
Fetch
stalwart-cli get action id1
Create
stalwart-cli create action/reload-settings
Query
stalwart-cli query action
Update
stalwart-cli update action id1 --field description='Updated'
Delete
stalwart-cli delete action --ids id1
Nested types
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
Details for a failed authentication check.
details
Type:
String?· server-setAuthentication result details
SpamClassifyTag
A tag and score contributing to spam classification.
score
Type:
Float· server-set · default:0Score associated with the tag
disposition
Type:
SpamClassifyTagDisposition· server-setDisposition associated with the tag
Enums
DmarcDisposition
| Value | Label |
|---|---|
none | No specific action requested |
quarantine | Treat failing messages as suspicious |
reject | Reject failing messages |
unspecified | Disposition not specified |
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
| Value | Label |
|---|---|
score | Assign the tag's score to the overall spam score |
reject | Reject the message |
discard | Discard the message |
SpamClassifyResult
| Value | Label |
|---|---|
spam | Classify as spam |
ham | Classify as non-spam (ham) |
reject | Reject message |
discard | Discard message |