SECTION OF THE RULES
Some examples
This section will only describes the rule part of the configuration file. For a full documentation about the other parameters in the config file, please see Set up the rules. Reminds you that each rule shown below must be preceded by a note giving the weight of this rule.
As you can guess if you see the small samples below, the rules are very easy to understand and to use. Syntax was conceived to be as short and expressive as possible. Rules are used to match words in the subject, the body or other headers in the email. For the moment, regular expressions is not available, so you cannot match the beginning of a word like in "lov*". But the power of these rules comes from the number of headers you can match and from the power of logic operators (OR, AND, ...) you can use with them.
Now, let us start with few examples :
Rule | Explanation (when the rule is activated ?) |
{subject:free} | The subject contains the word "free". By default, case is not sensitive, i.e. "FREE", "Free" or "fReE" is matched by this example. |
{from:anita} | This is the same example, but with the sender. You can include part of the name, or the whole address. |
{to:@hotmail} | This is the same example, but with the recipient. You can include special characters as '@', but some of them are forbidden (see the next section). This is made to be sure that "hotmail" is in the domain name. |
{body:please sign} | The key word 'body' corresponds to the message itself, excluding the headers. Space (' ') is not a reserved symbol and is matched just like it is. |
{subject:free|sex} | This is a more sophisticated example. The subject contains the word "free" OR the word "sex". '|' is a reserved operator for OR and '&' for AND. |
{subject:free&sex} | The subject contains the word "free" AND the word "sex" (in any order). You can extend the list and combine as many operators as you want. |
{subject:~free} | The subject must NOT contains the word "free". That wants to say that "frEEsbee" is refused by the rule but "f-r-e-e" is accepted. |
The filtering rules
ACTION {FIELD:KEYWORD}
Détails de chaque partie possible.
The findexp
Extended rules and additional examples