MtaOutboundThrottle
MtaOutboundThrottle
Section titled “MtaOutboundThrottle”Defines an outbound rate limit rule for message delivery.
This object can be configured from the WebUI under Settings › MTA › Rates & Quotas › Outbound Rate Limits
Fields
Section titled “Fields”enable
Section titled “enable”Type:
Boolean· default:trueWhether to enable this throttle
description
Section titled “description”Type:
String· requiredShort description for the throttle
Type:
MtaOutboundThrottleKey[]Optional list of context variables that determine where this throttle should be applied
Type:
Expression· default:{"else":"true"}Enable the imposition of concurrency and rate limits only when a specific condition is met
Available variables:
MtaQueueHostVariable.
Type:
Rate· requiredNumber of incoming requests over a period of time that the rate limiter will allow
JMAP API
Section titled “JMAP API”The MtaOutboundThrottle object is available via the urn:stalwart:jmap capability.
x:MtaOutboundThrottle/get
Section titled “x:MtaOutboundThrottle/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysMtaOutboundThrottleGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:MtaOutboundThrottle/get", { "ids": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:MtaOutboundThrottle/set
Section titled “x:MtaOutboundThrottle/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 sysMtaOutboundThrottleCreate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:MtaOutboundThrottle/set", { "create": { "new1": { "description": "Example", "key": {}, "rate": {} } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Update
Section titled “Update”This operation requires the sysMtaOutboundThrottleUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:MtaOutboundThrottle/set", { "update": { "id1": { "description": "updated value" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Destroy
Section titled “Destroy”This operation requires the sysMtaOutboundThrottleDestroy permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:MtaOutboundThrottle/set", { "destroy": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:MtaOutboundThrottle/query
Section titled “x:MtaOutboundThrottle/query”This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysMtaOutboundThrottleQuery permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:MtaOutboundThrottle/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 MtaOutboundThrottle id1Create
Section titled “Create”stalwart-cli create MtaOutboundThrottle \ --field description=Example \ --field 'key={}' \ --field 'rate={}'stalwart-cli query MtaOutboundThrottleUpdate
Section titled “Update”stalwart-cli update MtaOutboundThrottle id1 --field description='updated value'Delete
Section titled “Delete”stalwart-cli delete MtaOutboundThrottle --ids id1Nested types
Section titled “Nested types”Expression
Section titled “Expression”A conditional expression with match rules and a default value.
Type:
ExpressionMatch[]List of conditions and their corresponding results
Type:
String· requiredElse condition
ExpressionMatch
Section titled “ExpressionMatch”A single condition-result pair in an expression.
Type:
String· requiredIf condition
Type:
String· requiredThen clause
Defines a rate limit as a count over a time period.
Type:
UnsignedInt· default:0· min: 1 · max: 1000000Count
period
Section titled “period”Type:
Duration· default:"0s"· min: 1Period
MtaOutboundThrottleKey
Section titled “MtaOutboundThrottleKey”| Value | Label |
|---|---|
mx | MX Host |
remoteIp | Remote IP |
localIp | Local IP |
sender | Sender |
senderDomain | Sender Domain |
rcptDomain | Recipient Domain |
Expression references
Section titled “Expression references”The following expression contexts are used by fields on this page:
MtaQueueHostVariable(Variables)