Next: , Previous: , Up: Statements   [Contents][Index]

4.19.2 Variable Assignments

An assignment is a special statement that assigns a value to the variable. It has the following syntax:

set name value

where name is the variable name and value is the value to be assigned to it.

Assignment statements can appear in any part of a filter program. If an assignment occurs outside of function or handler definition, the value must be a literal value (see Literals). If it occurs within a function or handler definition, value can be any valid mailfromd expression (see Expressions). In this case, the expression will be evaluated and its value will be assigned to the variable. For example:

set delay 150

prog envfrom
  set delay delay * 2