Skip to main content
Version: 0.16

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: true

Whether to enable this quota

description

Type: String? · read-only

Short description for the quota

key

Type: MtaQueueQuotaKey[] · min items: 1

Optional list of context variables that determine where this quota should be applied

match

Type: Expression · required

Enable the imposition of concurrency and rate limits only when a specific condition is met

Available variables: MtaQueueHostVariable.

messages

Type: UnsignedInt? · min: 1

Maximum 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": {
"enable": true,
"key": [],
"match": {
"else": "Example",
"match": []
},
"messages": 1000,
"size": 1000
}
}
},
"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 mta-queue-quota id1

Create

stalwart-cli create mta-queue-quota \
--field enable=true \
--field 'key=[]' \
--field 'match={"else":"Example","match":[]}' \
--field messages=1000 \
--field size=1000

Query

stalwart-cli query mta-queue-quota

Update

stalwart-cli update mta-queue-quota id1 --field description='Updated'

Delete

stalwart-cli delete mta-queue-quota --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 · required

Else condition

ExpressionMatch

A single condition-result pair in an expression.

if

Type: String · required

If condition

then

Type: String · required

Then clause

Enums

MtaQueueQuotaKey

ValueLabel
senderSender
senderDomainSender Domain
rcptRecipient
rcptDomainRecipient Domain

Expression references

The following expression contexts are used by fields on this page: