User Tools

Site Tools


reference:spamrules_statement_ifinbag

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

reference:spamrules_statement_ifinbag [2018/11/14 10:45] (current)
Line 1: Line 1:
 +======Spam Filter Rules: IfInBag======
 +^Statement ​ |IfInBag |
 +^Version ​ |2.3.7+ |
 +^Purpose ​ |Checks if a specified value is in a particular bag |
  
 +The **IfInBag** statement requires a bag name and value, in the format
 +  IfInBag <bag name> <​value>​
 +
 +  *All **IfInBag** statements must be followed by an **EndIf** statement
 +  *You may optionally include an **Else** statement
 +  *The <​value>​ can either be a simple string, a regular expression (surrounded with '/'​ characters),​ or a 'DOS style' wildcarded expression
 +
 +
 +=====Examples=====
 +Basic example
 +<​code>​
 +IfInBag mybag "​value"​
 +# Statements
 +EndIf
 +</​code>​
 +
 +Using an **Else** statement
 +<​code>​
 +IfInBag mybag "​value"​
 +# Statements
 +Else
 +# Statements
 +EndIf
 +</​code>​
 +
 +Using a regular expression
 +<​code>​
 +IfInBag mybag "/​@domain\.com/​i"​
 +# Statements
 +EndIf
 +</​code>​
 +
 +Using a wildcarded expression
 +<​code>​
 +IfInBag mybag "​*@domain.com"​
 +# Statements
 +EndIf
 +</​code>​
reference/spamrules_statement_ifinbag.txt ยท Last modified: 2018/11/14 10:45 (external edit)