User Tools

Site Tools


reference:spamrules_statement_dns

This is an old revision of the document!


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, domain name and variable name, in the format

DNS <type> <domain name> <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:

<domain name>":"<type>":"<result>

Each result will be separated from the next by a linefeed character (“\n”)

See also

  • StartDNS - Can be used in advance of DNS being called, to improve script efficiency

Examples

The following example will look up the MX records for the domain 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
reference/spamrules_statement_dns.1314797906.txt.gz · Last modified: 2018/11/14 10:44 (external edit)