User Tools

Site Tools


Spam Filter Rules: If

Statement If
Version 2.1.7+
Purpose Enables you to perform a simple relational test on a variable

You can specify a variable or a constant on either or both sides of the relational operator. The relational operator can be one of:

== Test for equality
<> Test for inequality
<= Test for less than or equal
>= Test for greater than or equal
< Test for less than
> Test for greater than
  • There must be a space on either side of the relational operator.
  • All If statements must be followed by an EndIf statement
  • You may optionally include an Else statement


If ${score} < 100
# Statements

Note that it is not possible to combine tests within a single If statement, so if you need to test if two conditions are both met, you will need to nest two If statements, for instance

If ${score} < 100
 If ${subject} = "Hello"
#  Statements

Using the Else statement

If ${score} < 100
# Statements
# Statements
reference/spamrules_statement_if.txt · Last modified: 2018/11/14 10:45 (external edit)