--- id: authheaders version: "0.16.3" license: MIT license_treatment: permissive maintenance: dormant --- # authheaders — A library wrapping email authentication header verification and generation. License: permissive · Maintenance: dormant · Downloads: 399.7K/mo ## What it is and what it does authheaders is a Python library for generating and validating email authentication headers. It implements DKIM, SPF, DMARC, and ARC standards, allowing you to both verify incoming messages against these protocols and sign outgoing messages with DKIM or ARC signatures. The library packages validation results into standard Authentication-Results headers that mail systems use to communicate authentication status downstream. The package includes an embedded Public Suffix List (PSL) for DMARC organizational boundary detection, with optional support for system-provided PSL copies or manual updates. It also supports experimental extensions like PSD DMARC (RFC 9091) and DMARCbis policy discovery, though these are opt-in. The main entry points are `authenticate_message()` for validation and `sign_message()` for generating signatures. Use it for: - Validate incoming email messages against SPF, DKIM, and DMARC policies and generate Authentication-Results headers for downstream processing. - Sign outgoing messages with DKIM or ARC signatures to prove authenticity and prevent spoofing. - Build mail filtering or security systems that need to evaluate authentication status before delivery. - Implement DMARC policy enforcement in mail transport agents or filtering appliances. - Debug email authentication failures by examining raw validation results and header generation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates and validates email authentication headers (DKIM, SPF, DMARC, ARC) and packages validation results into Authentication-Results headers for email messages. Yes, if you need email authentication header handling in Python and can tolerate dormant maintenance. The library is stable, has no known vulnerabilities, and covers the core DKIM/SPF/DMARC/ARC use cases well. However, the 781-day release lag and lack of active development mean you should verify that the embedded PSL is current for your use case and be prepared to maintain a fork if critical bugs emerge. Suitable for production systems with low-change email authentication requirements. ## Install pip install authheaders uv add authheaders poetry add authheaders ## Installing authheaders Before you install: High install friction due to no runtime dependencies but a source distribution requiring build-time setup. Maintenance is dormant—last release was 781 days ago, though the repository remains active with a recent commit on 2024-06-24. The package has been stable since its 2017 initial release. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions. No license-related barriers to adoption. Quickstart: from authheaders import authenticate_message message = """From: sender@test.com\nTo: recipient@example.com\nSubject: Test\n\nBody""" result = authenticate_message(message, "example.com", ip='192.168.50.81', mail_from="test.com", helo="domain.of.sender.net") print(result) Requires Python >3.7. The package uses a Public Suffix List (PSL) embedded in the package; for current data, run `python3 setup.py pslupdate` before installation, or configure a system PSL path if available. Verify before relying: - Whether the embedded PSL copy is kept reasonably current given the 781-day release lag - Performance characteristics when validating large message volumes or complex DMARC policies - Compatibility with modern email infrastructure (e.g., BIMI, report-uri handling) ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: high - Maintenance: dormant - Downloads: 399.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags email authentication headers, DKIM SPF DMARC validation, ARC signing, email header generation, authentication results header, email security headers, message authentication, email-security, cryptography, standards-compliance [View on SkillFed](https://skillfed.io/packages/authheaders) · [View on PyPI](https://pypi.org/project/authheaders/)