Skip to main content

Project Logo

The Lupaxa Security Toolbox
Part of The Lupaxa Project


lupaxa-mx-inspector

Look up a domain's MX hosts, SPF, and DMARC policy from public DNS, with an optional SMTP banner probe.

[!WARNING] Authorised use only. --probe opens an SMTP session to the target MX hosts. Use it only on systems you are allowed to test.

Features

  • Query MX records (priority and host)
  • Query apex TXT for SPF (v=spf1)
  • Query _dmarc.<domain> for the published TXT record
  • Decode common DMARC tags (p, sp, rua, ruf, alignment, and more)
  • Score DNS-only spoofing posture (open / monitoring / enforcing / locked down)
  • Optional --probe SMTP banner / EHLO fingerprint (no authentication, no mail)
  • Human-readable table (colour on a TTY; --no-color or NO_COLOR to disable), or JSON
  • Library API (lookup_dmarc / lookup_mx / lookup_spf / score_posture / probe_smtp) and CLI (mx-inspector)
  • Fully typed, linted, formatted, and tested

Installation

From PyPI

pip install lupaxa-mx-inspector

From source (development mode)

pip install -e ".[dev]"

Requires Python 3.10+. Runtime dependencies: dnspython, prettytable, colored.

Library quick start

from lupaxa.mx_inspector import lookup_dmarc, lookup_mx, lookup_spf, score_posture

policy = lookup_dmarc("example.com")
hosts = lookup_mx("example.com")
spf = lookup_spf("example.com")
score = score_posture(policy, mx_hosts=hosts, spf_records=spf)
print(policy["p"], score.value, score.grade)

CLI quick start

mx-inspector --help
mx-inspector example.com
mx-inspector example.com example.org
mx-inspector example.com --format json
mx-inspector example.com --no-color
mx-inspector example.com --probe --port 587

You can also run the CLI as a module:

python -m lupaxa.mx_inspector --help
python -m lupaxa.mx_inspector --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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lupaxa_mx_inspector-0.2.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lupaxa_mx_inspector-0.2.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file lupaxa_mx_inspector-0.2.0.tar.gz.

File metadata

  • Download URL: lupaxa_mx_inspector-0.2.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lupaxa_mx_inspector-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bd4074244fa938ebc2631dd3afb8a542fff2df515632b8d521d14209cd2ad599
MD5 d2cb68b23378860d9e3b9ee1974edb8f
BLAKE2b-256 b336906731f7d752e61dd854b5053d6e716553a20a1ac35d0e36b18d71953975

See more details on using hashes here.

Provenance

The following attestation bundles were made for lupaxa_mx_inspector-0.2.0.tar.gz:

Publisher: generate-release.yml on lupaxa-security-toolbox/mx-inspector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lupaxa_mx_inspector-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lupaxa_mx_inspector-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 187b55f0cd9c6255981900c00cdfd020457df49a1770958696051cc350166d47
MD5 71076dd01c5b5ada9fb89071bf9ad509
BLAKE2b-256 b8523d016db77241f944534785b6b495294f85910c4f3d58407dbecfb0ac98c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for lupaxa_mx_inspector-0.2.0-py3-none-any.whl:

Publisher: generate-release.yml on lupaxa-security-toolbox/mx-inspector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 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