Spam Filter Rules: StartDNS

Statement StartDNS
Version 2.2.1+
Purpose Begins an asynchronous DNS lookup in advance of the result being required in a subsequent DNS statement

The StartDNS statement requires a type and hostname, in the format

StartDNS <type> <hostname>

The DNS lookup begins immediately, but the script is allowed to continue. When the DNS statement is reached, the script will get the result of the corresponding StartDNS statement. If the DNS lookup is still in progress, it will allow the lookup to complete, before returning the result.

Example

StartDNS MX pscs.co.uk

# Continue with the rest of the script, whilst also running the DNS lookup

# By the time the script reaches the DNS statement, the lookup should either be fully or partially completed.

DNS MX pscs.co.uk dnsresult