This shows you the differences between two versions of the page.
— |
reference:spamrules_statement_startdnsbl [2018/11/14 10:45] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Spam Filter Rules: StartDNSBL====== | ||
+ | ^Statement |StartDNSBL | | ||
+ | ^Version |2.2.1+ | | ||
+ | ^Purpose |Begins an asynchronous DNS blacklist lookup in advance of the result being required in a subsequent [[spamrules_statement_dnsbl|DNSBL]] statement | | ||
+ | The **StartDNSBL** statement requires a hostname and DNSBL zone, in the format | ||
+ | StartDNSBL <hostname> <DNSBL zone> | ||
+ | |||
+ | The DNS blacklist lookup begins immediately, but the script is allowed to continue. When the **DNSBL** statement is reached, the script will get the result of the corresponding **StartDNSBL** statement. If the DNS blacklist lookup is still in progress, it will allow the lookup to complete, before returning the result. | ||
+ | |||
+ | |||
+ | =====Example===== | ||
+ | <code> | ||
+ | StartDNSBL ${SenderIP} sbl.spamhaus.org | ||
+ | |||
+ | # Continue with the rest of the script, whilst also running the DNS blacklist lookup | ||
+ | |||
+ | # By the time the script reaches the DNSBL statement, the lookup should either be fully or partially completed. | ||
+ | |||
+ | DNSBL ${SenderIP} sbl.spamhaus.org dnsresult | ||
+ | </code> |