{"id":21034,"library":"checkdmarc","title":"checkdmarc","description":"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.","status":"active","version":"5.15.2","language":"python","source_language":"en","source_url":"https://github.com/domainaware/checkdmarc","tags":["dns","dmarc","spf","email","security","validation"],"install":[{"cmd":"pip install checkdmarc","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"Main entry point for checking multiple domains.","symbol":"check_domains","correct":"from checkdmarc import check_domains"},{"note":"Alias for single domain check.","symbol":"check_domain","correct":"from checkdmarc import check_domain"},{"note":"Typed dict for SPF results.","symbol":"SPFResult","correct":"from checkdmarc.types import SPFResult"},{"note":"Typed dict for DMARC results.","symbol":"DMARCResult","correct":"from checkdmarc.types import DMARCResult"}],"quickstart":{"code":"from checkdmarc import check_domains\nimport os\nresult = check_domains(['example.com'], nameservers=['1.1.1.1'])\nprint(result)","lang":"python","description":"Basic domain check for SPF and DMARC."},"warnings":[{"fix":"Replace keyword argument 'timeout_retries' with 'retries' in all calls. Set retries explicitly if relying on the old default.","message":"In 5.15.0, the 'timeout_retries' parameter was renamed to 'retries' and the default changed from 2 to 0.","severity":"breaking","affected_versions":">=5.15.0"},{"fix":"If you depend on auto-configured public resolvers, pass nameservers=['1.1.1.1','8.8.8.8'] explicitly.","message":"In 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.","severity":"breaking","affected_versions":">=5.16.0"},{"fix":"Prefer setting 'retries' and 'timeout' separately if needed.","message":"The 'timeout' parameter may be deprecated in future; use 'retries' for retry behavior.","severity":"deprecated","affected_versions":">=5.15.0"},{"fix":"Set retries>=1 to mitigate transient failures.","message":"The library may raise 'dns.resolver.LifetimeTimeout' for DNS timeouts, especially when using default retries (0 since 5.15.0).","severity":"gotcha","affected_versions":">=5.15.0"},{"fix":"Expect 'mx' key to be absent or empty in results.","message":"When checking domains with no MX records, the module no longer emits a warning (since 5.10.12).","severity":"gotcha","affected_versions":">=5.10.12"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install checkdmarc' in the correct Python environment.","cause":"Library not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'checkdmarc'"},{"fix":"Use 'retries' instead of 'timeout_retries'.","cause":"Parameter renamed in version 5.15.0.","error":"TypeError: check_domains() got an unexpected keyword argument 'timeout_retries'"},{"fix":"Increase 'retries' (e.g., retries=2) or set a higher 'timeout'.","cause":"DNS query timed out, often due to network issues or retries=0 default.","error":"dns.resolver.LifetimeTimeout"},{"fix":"Add an SPF record to the domain's DNS zone.","cause":"Domain has no SPF TXT record.","error":"checkdmarc.exceptions.SPFError: No SPF record found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}