Skip to content

ClusterRole

Defines a cluster node role with enabled tasks and listeners.

This object can be configured from the WebUI under Settings › Cluster › Roles

Type: String · read-only

Unique identifier for the role

Type: String?

Description of the role

Type: ClusterTaskGroup · required

Which tasks are enabled for this cluster role

Type: ClusterListenerGroup · required

Which network listeners are enabled for this cluster role

The ClusterRole object is available via the urn:stalwart:jmap capability.

This is a standard Foo/get method as defined in RFC 8620, Section 5.1.

This method requires the sysClusterRoleGet permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterRole/get",
{
"ids": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

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.

This operation requires the sysClusterRoleCreate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterRole/set",
{
"create": {
"new1": {
"listeners": {
"@type": "EnableAll"
},
"tasks": {
"@type": "EnableAll"
}
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This operation requires the sysClusterRoleUpdate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterRole/set",
{
"update": {
"id1": {
"description": "updated value"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This operation requires the sysClusterRoleDestroy permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterRole/set",
{
"destroy": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This is a standard Foo/query method as defined in RFC 8620, Section 5.5.

This method requires the sysClusterRoleQuery permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterRole/query",
{
"filter": {
"name": "example"
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

The x:ClusterRole/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):

ConditionKind
nametext

stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.

Terminal window
stalwart-cli get ClusterRole id1
Terminal window
stalwart-cli create ClusterRole \
--field 'tasks={"@type":"EnableAll"}' \
--field 'listeners={"@type":"EnableAll"}'
Terminal window
stalwart-cli query ClusterRole
stalwart-cli query ClusterRole --where name=example
Terminal window
stalwart-cli update ClusterRole id1 --field description='updated value'
Terminal window
stalwart-cli delete ClusterRole --ids id1

Defines which cluster tasks are enabled for a cluster role.

  • EnableAll: Enable all tasks. No additional fields.
  • DisableAll: Disable all tasks. No additional fields.
  • EnableSome: Enable some tasks. Carries the fields of ClusterTaskGroupProperties.
  • DisableSome: Disable some tasks. Carries the fields of ClusterTaskGroupProperties.

Specifies which tasks are enabled or disabled.

Type: ClusterTaskType[]

Tasks to enable or disable for this group

Defines which network listeners are enabled for a cluster role.

  • EnableAll: Enable all network listeners. No additional fields.
  • DisableAll: Disable all network listeners. No additional fields.
  • EnableSome: Enable some network listeners. Carries the fields of ClusterListenerGroupProperties.
  • DisableSome: Disable some network listeners. Carries the fields of ClusterListenerGroupProperties.

Specifies which listeners are enabled or disabled.

Type: Id<NetworkListener>[]

List of network listeners to enable or disable for this group

ValueLabel
storeMaintenanceStore Maintenance
accountMaintenanceAccount Maintenance
metricsCalculateCalculate Metrics
metricsPushPush Metrics
pushNotificationsPush Notifications
searchIndexingSearch Indexing
spamClassifierTrainingSpam Classifier Training
outboundMtaOutbound Email MTA
taskQueueProcessingTask Queue Processing
taskSchedulerTask Scheduling