Spam Filter Rules: DNSBL

Statement DNSBL
Version 2.1.7+
Purpose Allows the script to perform a DNS blacklist lookup, returning the result into a specified variable

The DNSBL statement requires a hostname, DNSBL zone and variable name, in the format

DNSBL <hostname> <DNSBL zone> <variable name>

See also

Example

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
IfMatch ${dnsresult} "/^127\.0\.0\.2$/"
  Log "(${SenderIP}) found in SBL.Spamhaus (${dnsresult})"
  ${Score} += 100 [sbl.spamhaus.org]
EndIf