MtaOutboundStrategy
Configures outbound message delivery routing, scheduling, and TLS strategies.
This object can be configured from the WebUI under Settings › MTA › Outbound › Strategy
Fields
connection
Type:
Expression· default:{"else":"'default'"}An expression that returns the connection strategy to use when delivering messages to remote SMTP servers
Available variables:
MtaQueueHostVariable.
route
Type:
Expression· default:{"else":"'mx'","match":[{"if":"is_local_domain(rcpt_domain)","then":"'local'"}]}An expression that returns the route name to use when delivering queued messages
Available variables:
MtaQueueRcptVariable.
schedule
Type:
Expression· default:{"else":"'remote'","match":[{"if":"is_local_domain(rcpt_domain)","then":"'local'"},{"if":"source == 'dsn'","then":"'dsn'"},{"if":"source == 'report'","then":"'report'"}]}An expression that returns the scheduling strategy to use when queueing messages
Available variables:
MtaQueueRcptVariable.
tls
Type:
Expression· default:{"else":"'default'","match":[{"if":"retry_num > 0 && last_error == 'tls'","then":"'invalid-tls'"}]}An expression that returns the TLS strategy to use when delivering messages to remote SMTP servers
Available variables:
MtaQueueHostVariable.
JMAP API
The MtaOutboundStrategy singleton is available via the urn:stalwart:jmap capability.
x:MtaOutboundStrategy/get
This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
For singletons, the ids argument should be the literal singleton (or null to return the single instance).
This method requires the sysMtaOutboundStrategyGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaOutboundStrategy/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:MtaOutboundStrategy/set
This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.
This method requires the sysMtaOutboundStrategyUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaOutboundStrategy/set",
{
"update": {
"singleton": {
"connection": {
"else": "'default'"
}
}
}
},
"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-outbound-strategy
Update
stalwart-cli update mta-outbound-strategy --field description='Updated'
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
Expression references
The following expression contexts are used by fields on this page:
MtaQueueHostVariable(Variables)MtaQueueRcptVariable(Variables)