Skip to main content

Validates Sender Policy Framework (SPF) strings to ensure they are formatted correctly.

Project description

spf-validator

spf-validator is a Python package for validating Sender Policy Framework strings and records to ensure they are formatted correctly.

The validation returns a list of strings where each string, if any, is an issue with the SPF record.

Installation

Use pip to install:

pip install spf-validator

Usage

There are two main functions in the package: validate_spf_string and validate_domain_spf. Both of these will return a list of strings where each string, if any, is an issue with the SPF record.

To validate an SPF string, use validate_spf_string by passing it the string.

To use:

from spf_validator import validator

issues_list = validator.validate_spf_string('v=spf1 a mx include:_spf.google.com ~all')

To validate an SPF record on a given domain, use validate_domain_spf by passing it the domain. This will retrieve the TXT records for the domain, locate the SPF record, and validate it.

To use:

from spf_validator import validator

issues_list = validator.validate_domain_spf('google.com')

Contributing

Community made feature requests, patches, bug reports, and contributions are always welcome.

Please review our contributing guidelines if you decide to make a contribution.

License

This project is licensed under the MIT License. See LICENSE for more details.

Project details


Download files

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

Source Distribution

spf_validator-1.3.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

spf_validator-1.3.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file spf_validator-1.3.0.tar.gz.

File metadata

  • Download URL: spf_validator-1.3.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for spf_validator-1.3.0.tar.gz
Algorithm Hash digest
SHA256 ccd2163a4267232c3e5377d067efc0f949dc0e8039589a312e9f9287abd78368
MD5 1f10450de8474c2c44992f8f2d7f7051
BLAKE2b-256 2a218ed37009003730d1ae6a322ebcd1421d8c38c3b8bc8813f496cc46a9e812

See more details on using hashes here.

File details

Details for the file spf_validator-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spf_validator-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50985e32958c86486ebc8be4b50fffef40ec49cec02cc67158d8deaff2f4b1d6
MD5 d6c603ae41e2bc1dfc7f85bea95fa2c7
BLAKE2b-256 91e762f259fd57a8192504399477fd03fe539bcfe8b8ee3501cd2f28d2ecb5c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page