Skip to main content

Project Logo

The Lupaxa SRE Toolbox
Part of The Lupaxa Project


lupaxa-dns-blacklist-checker

Check whether an IP address or hostname is listed on DNS blacklists.

Features

  • Query a built-in list of DNSBL zones in parallel
  • Accept IPv4 addresses, IPv6 addresses, and hostnames
  • Check every address a hostname resolves to
  • Check every address of each mail exchanger with --mx
  • Report the return code and TXT reason for a listing
  • Treat Spamhaus and Abusix policy codes as notes, not listings
  • Use a Spamhaus Data Query Service key with --spamhaus-key or SPAMHAUS_DQS_KEY
  • Record a zone query failure without treating it as a listing
  • Override the zone list and the per-zone timeout
  • Install dns-blacklist-checker, with dnsbl as an alias for the same command
  • Use the check library API
  • Depend only on dnspython at runtime

Installation

From PyPI

pip install lupaxa-dns-blacklist-checker

From source (development mode)

pip install -e ".[dev]"

Requires Python 3.13+.

Library quick start

from lupaxa.dns_blacklist_checker import check

result = check("203.0.113.9", zones=("zen.spamhaus.org", "bl.spamcop.net"))
for item in result.addresses:
    print(item.address, item.listed)
    for zone in item.zones:
        print(zone.zone, zone.detail, zone.return_codes, zone.reason)

CLI quick start

dns-blacklist-checker --help
dns-blacklist-checker 192.0.2.1 example.com
dns-blacklist-checker 203.0.113.1 --zone zen.spamhaus.org --timeout 5

dnsbl is an alias for dns-blacklist-checker. Both commands accept the same flags and print the same output.

You can also run the CLI as a module:

python -m lupaxa.dns_blacklist_checker --help
python -m lupaxa.dns_blacklist_checker --version

Options

  • TARGET: one or more IPv4 addresses, IPv6 addresses, or hostnames
  • --timeout, -t: per-zone DNS timeout in seconds; default 5
  • --zone, -z: DNSBL zone to query; repeat to replace the built-in list
  • --mx: check every address of each mail exchanger for a domain
  • --spamhaus-key: Spamhaus Data Query Service key; default SPAMHAUS_DQS_KEY
  • --version: print the package version

Documentation

Online documentation:

Documentation

Source repository:

GitHub

Serve docs locally

From a clone of the repository:

make mkdocs-serve

Then open the local URL printed by MkDocs in your browser.

Development

Clone the repository and install with Make:

make init                # first-time makefile-skills checkout
make python-install-dev  # editable install with [dev]
make python-check        # lint, type-check, and test
The Lupaxa Project Footer

Release files for lupaxa-dns-blacklist-checker 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lupaxa-dns-blacklist-checker 0.1.0
File Size Uploaded
lupaxa_dns_blacklist_checker-0.1.0.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lupaxa-dns-blacklist-checker 0.1.0
File Interpreter ABI Platform
lupaxa_dns_blacklist_checker-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.1 kB

Release files / lupaxa_dns_blacklist_checker-0.1.0.tar.gz

Download URL lupaxa_dns_blacklist_checker-0.1.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ccca9d4e1ed78db1310c419595bce4440f085b60e616f9a83ca428bfb51ea40a
BLAKE2b-256 checksum
How to use checksums
15c9f520b58a09cf0169ab4a6c6ed9fb403a804328142aa634541e80bd2cb5f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / lupaxa_dns_blacklist_checker-0.1.0-py3-none-any.whl

Download URL lupaxa_dns_blacklist_checker-0.1.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
348baa54605f9b72d5918e50557f45fdd8bfe5e8fff09945dcc75cb6c01556b7
BLAKE2b-256 checksum
How to use checksums
482d0e24e15981a6084e5c85542e37539394ca1c6e2a53ba2872e1f627080c23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page