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.
When contributing please ensure you follow the guidelines below so that we can keep on top of things.
Creating Issues
- If you have any bugs or feature requests for the plugin itself, please create an issue
- For bug reports, please clearly describe the bug/issue and include steps on how to reproduce it
- For feature requests, please clearly describe what you would like and how it would be used
Pull Requests
- Ensure you stick to the PEP 8.
- When committing, reference your issue (if present) and include a note about the fix.
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
Built Distribution
Hashes for spf_validator-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70eb6054dd893cdd1680028c7d373f33028cdcfeb7a0358c4e2a5b0db8c56170 |
|
MD5 | 70a16dbf564fe864cfa9295cbce6a472 |
|
BLAKE2b-256 | 1ab58cd18447f67f396fbda5eac362ac653e6415f43ba77a2c90b0d2cb67ae38 |