User Tools

Site Tools


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:


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


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 dnsresult

# A plausible value for ${dnsresult} is included on the next line
reference/spamrules_statement_dns.txt · Last modified: 2018/11/14 10:45 (external edit)