Overview
Expressions are small conditional programs evaluated at runtime, controlling aspects such as whether a connection is accepted, which authentication mechanisms are offered, or how a message is routed. Several JMAP objects expose fields whose value is an expression; examples include saslMechanisms on MtaStageAuth, route on MtaRoute, and allowedEndpoints on Http. The reference page for each object marks which of its fields are expression-typed.
Operators
Expressions may combine values using arithmetic, logical, and comparison operators.
Functions
Functions perform a specific operation on zero or more arguments and produce a value that the surrounding expression can compose with operators or other functions. The general syntax is:
Values
Values produced by an expression can be assembled from literal strings and numbers, from context variables, and from the capture groups of a preceding regular-expression match. Three substitution mechanisms are available: context variable references, positional capture groups, and string concatenation with the + operator.