User Tools

Site Tools


reference:spamrules_statement_ifinbag

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

IfInBag mybag "value"
# Statements
EndIf

Using an Else statement

IfInBag mybag "value"
# Statements
Else
# Statements
EndIf

Using a regular expression

IfInBag mybag "/@domain\.com/i"
# Statements
EndIf

Using a wildcarded expression

IfInBag mybag "*@domain.com"
# Statements
EndIf
reference/spamrules_statement_ifinbag.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1