Spam Filter Rules: DNS

Statement DNS
Version 2.1.11+
Purpose Allows the script to perform an arbitrary DNS lookup, returning the result into a specified variable

The DNS statement requires a type, hostname and variable name, in the format

DNS <type> <hostname> <variable name>

The result variable will contain a list of the results found (more than one result may be found for any particular DNS query), in the form:

<hostname>":"<type>":"<result>

Each result will be separated from the next by a linefeed character (ā€œ\nā€)

See also

Examples

The following example will look up the MX records for the hostname specified in the ${Domain} variable, and put the result into the ${dnsresult} variable

DNS MX ${Domain} dnsresult

Returned data

DNS MX pscs.co.uk dnsresult

# A plausible value for ${dnsresult} is included on the next line
# pscs.co.uk:mx:smtp2.redcondor.com\n pscs.co.uk:mx:spoolers.redcondor.com\n pscs.co.uk:ns:ns0.pscs.com\n pscs.co.uk:ns:ns0.pscs.co.uk