User Tools

Site Tools


reference:spamrules_statement_addbag
no way to compare when less than two revisions

Differences

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


Previous revision
reference:spamrules_statement_addbag [2018/11/14 10:45] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +======Spam Filter Rules: AddBag======
 +^Statement  |AddBag |
 +^Version  |2.2.1+ |
 +^Purpose  |Adds a value into a 'bag' containing a collection of values, creating the bag if necessary |
  
 +The **AddBag** statement requires a type, bag name and value, in the format
 +  AddBag <type> <bag name> <value>
 +
 +  *<type> may be either 'unique' or 'multi'
 +  *If <type> is 'unique', then 'value' will only be added to 'bag' if it does not already exist there
 +  *If <type> is 'multi', then 'value' will always be added to 'bag'
 +
 +=====Example=====
 +The following example demonstrates the 'unique' method of adding a value to a bag
 +<code>
 +${myvalue} = "a"
 +AddBag unique bag1 ${myvalue}
 +AddBag unique bag1 "b"
 +AddBag unique bag1 "a"
 +# 'bag1' bag contains the values "a" and "b"
 +</code>
 +
 +
 +The following example demonstrates the 'multi' method of adding a value to a bag
 +<code>
 +${myvalue} = "a"
 +AddBag multi bag2 ${myvalue}
 +AddBag multi bag2 "b"
 +AddBag multi bag2 "a"
 +# 'bag2' bag contains the values "a", "b" and "a"
 +</code>
reference/spamrules_statement_addbag.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1