This shows you the differences between two versions of the page.
| reference:spamrules_statement_foreach_addr [2011/08/22 15:37] – created simon | reference:spamrules_statement_foreach_addr [2011/08/22 16:32] (current) – removed simon | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======Spam Filter Rules: ForEach Addr====== | ||
| - | ^Statement | ||
| - | ^Version | ||
| - | ^Purpose | ||
| - | 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 ' | ||
| - | < | ||
| - | ForEach Addr Cc CcAddr | ||
| - | Log " | ||
| - | EndFor | ||
| - | #There should be a separate entry in the log file for each ' | ||
| - | </ | ||
| - | |||
| - | The following example loops through each email address found in the ' | ||
| - | < | ||
| - | ForEach Addr Reply-To ReplyAddr | ||
| - | | ||
| - | ${Score} += 100 [whitelist] | ||
| - | Break | ||
| - | EndIf | ||
| - | EndFor | ||
| - | </ | ||