MtaStageEhlo
MtaStageEhlo
Section titled “MtaStageEhlo”Configures EHLO command requirements and validation.
This object can be configured from the WebUI under Settings › MTA › Session › EHLO Stage
Fields
Section titled “Fields”rejectNonFqdn
Section titled “rejectNonFqdn”Type:
Expression· default:{"else":"false","match":[{"if":"local_port == 25","then":"true"}]}Whether to reject EHLO commands that do not include a fully-qualified domain name as a parameter
Available variables:
MtaConnectionVariable.
require
Section titled “require”Type:
Expression· default:{"else":"true"}Whether the remote client must send an EHLO command before starting an SMTP transaction
Available variables:
MtaConnectionVariable.
script
Section titled “script”Type:
Expression· default:{"else":"false"}Which Sieve script to run after the client sends an EHLO command
Available variables:
MtaConnectionVariable.
JMAP API
Section titled “JMAP API”The MtaStageEhlo singleton is available via the urn:stalwart:jmap capability.
x:MtaStageEhlo/get
Section titled “x:MtaStageEhlo/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 sysMtaStageEhloGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:MtaStageEhlo/get", { "ids": [ "singleton" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:MtaStageEhlo/set
Section titled “x:MtaStageEhlo/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 sysMtaStageEhloUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:MtaStageEhlo/set", { "update": { "singleton": { "rejectNonFqdn": { "else": "false", "match": [ { "if": "local_port == 25", "then": "true" } ] } } } }, "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 MtaStageEhloUpdate
Section titled “Update”stalwart-cli update MtaStageEhlo --field rejectNonFqdn='{"else":"false","match":[{"if":"local_port == 25","then":"true"}]}'Nested 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
Expression references
Section titled “Expression references”The following expression contexts are used by fields on this page:
MtaConnectionVariable(Variables)