This is an old revision of the document!
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
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