Skip to content

MtaStageAuth

Configures SMTP authentication requirements and error handling.

This object can be configured from the WebUI under Settings › MTA › Session › AUTH Stage

Type: Expression · default: {"else":"3"}

Maximum number of authentication errors allowed before the session is disconnected

Available variables: MtaEhloVariable.

Type: Expression · default: {"else":"5s"}

Time interval to wait after an authentication failure

Available variables: MtaEhloVariable.

Type: Expression · default: {"else":"false","match":[{"if":"local_port != 25 && is_tls","then":"[plain, login, oauthbearer, xoauth2]"},{"if":"local_port != 25","then":"[oauthbearer, xoauth2]"}]}

A list of SASL authentication mechanisms offered to clients, or an empty list to disable authentication. Stalwart supports PLAIN, LOGIN, and OAUTHBEARER mechanisms

Available variables: MtaEhloVariable.

Available constants: MtaAuthTypeConstant.

Type: Expression · default: {"else":"true"}

Specifies whether the authenticated user or any of their associated e-mail addresses must match the sender of the email message

Available variables: MtaMailFromVariable.

Type: Expression · default: {"else":"local_port != 25"}

Specifies whether authentication is necessary to send email messages

Available variables: MtaEhloVariable.

The MtaStageAuth singleton is available via the urn:stalwart:jmap capability.

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 sysMtaStageAuthGet permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaStageAuth/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

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 sysMtaStageAuthUpdate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaStageAuth/set",
{
"update": {
"singleton": {
"maxFailures": {
"else": "3"
}
}
}
},
"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.

Terminal window
stalwart-cli get MtaStageAuth
Terminal window
stalwart-cli update MtaStageAuth --field maxFailures='{"else":"3"}'

A conditional expression with match rules and a default value.

Type: ExpressionMatch[]

List of conditions and their corresponding results

Type: String · required

Else condition

A single condition-result pair in an expression.

Type: String · required

If condition

Type: String · required

Then clause

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