, program needs setgid to be able to use it).
.SS VARIABLES
Variables can be specified in the config file. Their identifiers must start
-with the letter
-.B "$"
-, variables have three types that are distinguisghed according to the case of
+with the letter \fB$\fP, variables have three types that are distinguisghed according to the case of
the identifiers. Upper case identifiers are reserved for automatic variables
like message size, it is possible to modify them but it is not encouraged.
Variables with identifiers starting with an upper-case letter but mixed case
.P
.B "Lvalue = Rvalue ;"
.P
-Lvalue is a variable identifier. Rvalue can be variable, a constant (constant
-must be given in double quotes) or an expression consisting of variables,
-constants and binary operations
-.B .
-,
-.B +
-,
-.B \-
-,
-.B *
-and
-.B /
-, operation
-.B .
-stands for string contatenations, the rest of them are arithmetic operations.
-Doing arithmetic operations makes sense only on integers. Precedence of the
-operations can be specified using parentheses.
+Lvalue is a variable identifier. Rvalue can be variable, a constant (either a
+string constant that must be given in double quotes or an integer) or an
+expression consisting of variables, constants and binary operations
+\fB.\fP, \fB+\fP, \fB\-\fP, \fB*\fP and \fB/\fP, operation \fB.\fP stands for string
+contatenations, the rest of them are arithmetic operations. Doing arithmetic
+operations makes sense only on integers. Precedence of the operations can be
+specified using parentheses, arithmetic operators have a usual priority,
+string concatenations has the lowest priority.
.SS ACTIONS
Actions are specified with an arrow operator.
.TP
.B "-> expression ;"
means "deliver the e-mail the mailbox specified behind arrow and exit"
.TP
-.B "-> pipe expression ;"
+\fB->\fI pipe \fBexpression ;\fP
means "pipe the e-mail to the external program specified behind pipe
keyword". Output of the program is stored in
.B $LAST_OUTPUT
.B $LAST_EXIT_CODE
variable.
.TP
-.B "-> filter expression"
+\fB-> \fIfilter\fB expression\fB ;\fP
means "pipe the e-mail to the external program and replace it with output of the program". All the header variables,
.B $MAIL_LEN
and
.B $LAST_EXIT_CODE
are set accordingly.
.TP
-.B "-> discard ;"
+\fB-> \fIdiscard\fB ;\fP
means just "discard the email and exit".
.TP
-.B -> mail expression ;
+\fB -> \fImail\fB expression ;\fP
means "forward the e-mail to the address specifed behind the mail keyword and exit"
.TP -1
If action fails, the e-mail is delivered to the default mailbox.
Some of the actions (delivery or forwarding an e-mail) can have keyword copy
in front of the arrow, ie.
.P
-.B "copy -> $mailbox;"
+\fIcopy\fB -> $mailbox;\fP
.P
When copy is specified, the program does not exit after doing an action but
continues reading the rules. It also does not deliver to the default mailbox if
.SS CONDITIONS
Conditional execution of commands can be specified in a following way:
.P
-.B "if (condition) { ... }"
+\fIif\fB (condition) { ... }
.P
-.B "if (condtion) { ... } else { ... }"
+\fIif\fB (condtion) { ... } \fIelse\fB { ... }
.P
-.B "if (condition) { ... } else if { ... } [ else { ... } ]"
+\fIif\fB (condition) { ... } \fIelse if\fB { ... } [ \fIelse\fB { ... } ]\fP
.P
where the condition can be a constant, a variable or an expression consisting
of following operations:
.TP
.B "&"
-is binary boolean and
+is boolean and
.TP
.B "|"
-is binary boolean or
+is boolean or
.TP
.B "^"
-is binary boolean xor
+is boolean xor
.TP
.B "!"
-is unary boolean not
+is boolean not
.TP -1
A variable or a constant has a boolean value 0, if its value is either "" or
"0" and 1 otherwise.
means "is not equal to"
.TP
.B <
-means "is lesser than"
+means "is less than"
.TP
.B >
means "is greater than"
.TP
.B <=
-means "is lesser or equal than"
+means "is less or equal than"
.TP
.B >=
means "is greater or equal than"