Examples
dnsbl is an alias for dns-blacklist-checker. The shell examples below use
the full command name. Swap in dnsbl anywhere you would type
dns-blacklist-checker.
One address, built-in zones
Several targets
One zone and a shorter timeout
Library, selected zones
from lupaxa.dns_blacklist_checker import check
result = check(
"mail.example.com",
zones=("zen.spamhaus.org", "bl.spamcop.net"),
timeout=2.0,
)
for item in result.addresses:
print(result.query, item.address, item.listed)
IPv6 address
Mail exchangers
Spamhaus Data Query Service
export SPAMHAUS_DQS_KEY=your-key
dns-blacklist-checker 203.0.113.9 --spamhaus-key "$SPAMHAUS_DQS_KEY"