User Tools

Site Tools


reference:spamrules_statement_foreach_addr

Differences

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

Link to this comparison view

reference:spamrules_statement_foreach_addr [2011/08/22 16:37] – created simonreference:spamrules_statement_foreach_addr [2011/08/22 17:32] (current) – removed simon
Line 1: Line 1:
-======Spam Filter Rules: ForEach Addr====== 
-^Statement  |ForEach Addr | 
-^Version  |2.1.11+ | 
-^Purpose  |Causes a loop to be run through for each address contained in the specified header line of the message | 
  
-The **ForEach Addr** statement requires a header name and a loop variable name, in the format 
-  ForEach Addr <header name> <loop variable name> 
- 
-On each pass through the loop, the loop variable will contain the current value of the address found. 
- 
-All **ForEach Addr** statements must be followed by an **EndFor** statement 
- 
- 
-=====Examples===== 
-The following example loops through each email address found in the 'Cc' header field of the message, and puts it into the '${CcAddr}' variable. This is then sent to the log file. 
-<code> 
-ForEach Addr Cc CcAddr 
- Log "${CcAddr}" 
-EndFor 
-#There should be a separate entry in the log file for each 'Cc' address 
-</code> 
- 
-The following example loops through each email address found in the 'Reply-To' header field of the message, and puts it into the '${ReplyAddr}' variable. This is then checked against the sender's whitelist. 
-<code> 
-ForEach Addr Reply-To ReplyAddr 
- IfMatch WhiteList ${ReplyAddr} 
-  ${Score} += 100 [whitelist] 
-  Break 
- EndIf 
-EndFor 
-</code> 
reference/spamrules_statement_foreach_addr.1314027446.txt.gz · Last modified: 2018/11/14 10:44 (external edit)