MtaQueueQuota
Defines a quota rule for message queues.
This object can be configured from the WebUI under Settings › MTA › Rates & Quotas › Queue Quotas
Fields
enable
Type:
Boolean· default:trueWhether to enable this quota
description
Type:
String?· read-onlyShort description for the quota
key
Type:
MtaQueueQuotaKey[]· min items: 1Optional list of context variables that determine where this quota should be applied
match
Type:
Expression· requiredEnable the imposition of concurrency and rate limits only when a specific condition is met
Available variables:
MtaQueueHostVariable.
messages
Type:
UnsignedInt?· min: 1Maximum number of messages in the queue that this quota will allow
size
Type:
Size?Maximum total size of messages in the queue that this quota will allow
JMAP API
The MtaQueueQuota object is available via the urn:stalwart:jmap capability.
x:MtaQueueQuota/get
This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysMtaQueueQuotaGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaQueueQuota/get",
{
"ids": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:MtaQueueQuota/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 sysMtaQueueQuotaCreate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaQueueQuota/set",
{
"create": {
"new1": {
"key": {},
"match": {
"else": "Example",
"match": {}
}
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Update
This operation requires the sysMtaQueueQuotaUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaQueueQuota/set",
{
"update": {
"id1": {
"enable": true
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Destroy
This operation requires the sysMtaQueueQuotaDestroy permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaQueueQuota/set",
{
"destroy": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:MtaQueueQuota/query
This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysMtaQueueQuotaQuery permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaQueueQuota/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 MtaQueueQuota id1
Create
stalwart-cli create MtaQueueQuota \
--field 'key={}' \
--field 'match={"else":"Example","match":{}}'
Query
stalwart-cli query MtaQueueQuota
Update
stalwart-cli update MtaQueueQuota id1 --field enable=true
Delete
stalwart-cli delete MtaQueueQuota --ids id1
Nested types
Expression
A conditional expression with match rules and a default value.
match
Type:
ExpressionMatch[]List of conditions and their corresponding results
else
Type:
String· requiredElse condition
ExpressionMatch
A single condition-result pair in an expression.
if
Type:
String· requiredIf condition
then
Type:
String· requiredThen clause
Enums
MtaQueueQuotaKey
| Value | Label |
|---|---|
sender | Sender |
senderDomain | Sender Domain |
rcpt | Recipient |
rcptDomain | Recipient Domain |
Expression references
The following expression contexts are used by fields on this page:
MtaQueueHostVariable(Variables)