Registry / http-networking / checkdmarc

checkdmarc

JSON →
library5.17.1pypypi✓ verified 86d ago

A Python module and CLI tool for parsing and validating SPF and DMARC DNS records. Current version 5.15.2. Release cadence is irregular with periodic fixes and breaking changes.

pip install checkdmarc
INSTALL
IMPORT
SIG · CHECKDMARC
C
checkdmarc
http-networkingpythonv5.17.1
Install
4.0s avg
Import
1312ms
Disk
40MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.17.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.372s · 41.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.0s · import 1.252s · 42MB
40MB installed
● package 40MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

check_domains
from checkdmarc import check_domains
Main entry point for checking multiple domains.
check_domain
from checkdmarc import check_domain
Alias for single domain check.
SPFResult
from checkdmarc.types import SPFResult
Typed dict for SPF results.
DMARCResult
from checkdmarc.types import DMARCResult
Typed dict for DMARC results.

Basic domain check for SPF and DMARC.

from checkdmarc import check_domains import os result = check_domains(['example.com'], nameservers=['1.1.1.1']) print(result)
checkdmarc --version
Debug
Known issues
breakingIn 5.15.0, the 'timeout_retries' parameter was renamed to 'retries' and the default changed from 2 to 0.
fix
Replace keyword argument 'timeout_retries' with 'retries' in all calls. Set retries explicitly if relying on the old default.
affects: >=5.15.0
breakingIn 5.16.0, when 'nameservers' is None, checkdmarc now falls back to system resolvers instead of auto-configuring public DNS. This reverts a 5.15.0 change.
fix
If you depend on auto-configured public resolvers, pass nameservers=['1.1.1.1','8.8.8.8'] explicitly.
affects: >=5.16.0
deprecatedThe 'timeout' parameter may be deprecated in future; use 'retries' for retry behavior.
fix
Prefer setting 'retries' and 'timeout' separately if needed.
affects: >=5.15.0
gotchaThe library may raise 'dns.resolver.LifetimeTimeout' for DNS timeouts, especially when using default retries (0 since 5.15.0).
fix
Set retries>=1 to mitigate transient failures.
affects: >=5.15.0
gotchaWhen checking domains with no MX records, the module no longer emits a warning (since 5.10.12).
fix
Expect 'mx' key to be absent or empty in results.
affects: >=5.10.12
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'checkdmarc'
Library not installed or installed in wrong environment.
fix
Run 'pip install checkdmarc' in the correct Python environment.
TypeError: check_domains() got an unexpected keyword argument 'timeout_retries'
Parameter renamed in version 5.15.0.
fix
Use 'retries' instead of 'timeout_retries'.
dns.resolver.LifetimeTimeout
DNS query timed out, often due to network issues or retries=0 default.
fix
Increase 'retries' (e.g., retries=2) or set a higher 'timeout'.
checkdmarc.exceptions.SPFError: No SPF record found
Domain has no SPF TXT record.
fix
Add an SPF record to the domain's DNS zone.
Upgrade
Version history
5.17.1latest on PyPI · released Jun 17, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
checkdmarc — pip install checkdmarc · libregistry