This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| reference:spamrules_statement_dnsbl [2011/08/31 15:20] – created simon | reference:spamrules_statement_dnsbl [2020/10/23 16:07] (current) – [Example] paul | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| The **DNSBL** statement requires a hostname, DNSBL zone and variable name, in the format | The **DNSBL** statement requires a hostname, DNSBL zone and variable name, in the format | ||
| DNSBL < | DNSBL < | ||
| + | |||
| + | **See also** | ||
| + | * [[spamrules_statement_startdnsbl|StartDNSBL]] - Can be used in advance of **DNSBL** being called, to improve script efficiency | ||
| =====Example===== | =====Example===== | ||
| - | The following example returns the result of the DNS blacklist lookup into the ${dnsresult} variable | + | The following example returns the result of the DNS blacklist lookup into the ${dnsresult} variable, then compares that to a value and, if it matches, logs the result and adds onto the spam filter score. |
| < | < | ||
| DNSBL ${SenderIP} sbl.spamhaus.org dnsresult | DNSBL ${SenderIP} sbl.spamhaus.org dnsresult | ||
| + | IfMatch ${dnsresult} "/ | ||
| + | Log " | ||
| + | ${Score} += 100 [sbl.spamhaus.org] | ||
| + | EndIf | ||
| </ | </ | ||