MtaStageConnect
Configures SMTP connection greeting and hostname settings.
This object can be configured from the WebUI under Settings › MTA › Session › Connect Stage
Fields
smtpGreeting
Type:
Expression· default:{"else":"system('hostname') + ' Stalwart ESMTP at your service'"}The greeting message sent by the SMTP/LMTP server
Available variables:
MtaConnectionVariable.
hostname
Type:
Expression· default:{"else":"system('hostname')"}The SMTP server hostname
Available variables:
MtaConnectionVariable.
script
Type:
Expression· default:{"else":"false"}Which Sieve script to run when a client connects
Available variables:
MtaConnectionVariable.
JMAP API
The MtaStageConnect singleton is available via the urn:stalwart:jmap capability.
x:MtaStageConnect/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 sysMtaStageConnectGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaStageConnect/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:MtaStageConnect/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 sysMtaStageConnectUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaStageConnect/set",
{
"update": {
"singleton": {
"smtpGreeting": {
"else": "system('hostname') + ' Stalwart ESMTP at your service'"
}
}
}
},
"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-stage-connect
Update
stalwart-cli update mta-stage-connect --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:
MtaConnectionVariable(Variables)