User Tools

Site Tools


reference:spamrules_statement_foreach_header

Differences

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

Link to this comparison view

reference:spamrules_statement_foreach_header [2011/08/22 16:51] – created simonreference:spamrules_statement_foreach_header [2011/08/22 17:32] (current) – removed simon
Line 1: Line 1:
-======Spam Filter Rules: ForEach Header====== 
-^Statement  |ForEach Header | 
-^Version  |2.2.1+ | 
-^Purpose  |Causes a loop to be run through for each header line in the message | 
  
-The **ForEach Header** statement requires a loop variable name, in the format 
-  ForEach Header <loop variable name> 
- 
-On each pass through the loop, the loop variable will contain the current value of the header line. 
- 
-All **ForEach Header** statements must be followed by an **EndFor** statement 
- 
- 
-=====Examples===== 
-The following example loops through each header line and puts it into the '${HeaderLine}' variable. This is then sent to the log file. 
-<code> 
-ForEach Header HeaderLine 
- Log "${HeaderLine}" 
-EndFor 
-#There should be a separate entry in the log file for each header line 
-</code> 
- 
-The following example loops through all of the header lines of the message, and look for the 'Received:' header lines 
-<code> 
-ForEach Header HeaderLine 
- IfMatch ${HeaderLine} /^Received:/ 
-# Statements 
- EndIf 
-EndFor 
-</code> 
reference/spamrules_statement_foreach_header.1314028274.txt.gz · Last modified: 2018/11/14 10:44 (external edit)