{"id":19608901,"url":"https://github.com/forwardemail/python-spfcheck2","last_synced_at":"2025-04-27T20:33:10.097Z","repository":{"id":42367830,"uuid":"173999000","full_name":"forwardemail/python-spfcheck2","owner":"forwardemail","description":"Node.js wrapper around Python's spf.check2 function which conforms to both RFC4408 and RFC7208","archived":false,"fork":false,"pushed_at":"2025-03-14T05:46:49.000Z","size":501,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T16:12:28.572Z","etag":null,"topics":["check","check2","email","forwarding","mail","node","python","rfc4408","rfc7208","spf","validate","validation","validator","wrapper"],"latest_commit_sha":null,"homepage":"https://forwardemail.net","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/forwardemail.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-05T18:26:14.000Z","updated_at":"2021-03-11T08:29:48.000Z","dependencies_parsed_at":"2024-10-22T19:39:48.326Z","dependency_job_id":null,"html_url":"https://github.com/forwardemail/python-spfcheck2","commit_stats":{"total_commits":36,"total_committers":1,"mean_commits":36.0,"dds":0.0,"last_synced_commit":"956553e52ded358a1e4bbfdd7e4ed758d9bbfc4d"},"previous_names":["niftylettuce/python-spfcheck2"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fpython-spfcheck2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fpython-spfcheck2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fpython-spfcheck2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fpython-spfcheck2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forwardemail","download_url":"https://codeload.github.com/forwardemail/python-spfcheck2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251204772,"owners_count":21552287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["check","check2","email","forwarding","mail","node","python","rfc4408","rfc7208","spf","validate","validation","validator","wrapper"],"created_at":"2024-11-11T10:18:31.152Z","updated_at":"2025-04-27T20:33:09.594Z","avatar_url":"https://github.com/forwardemail.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-spfcheck2\n\n[![build status](https://img.shields.io/travis/com/niftylettuce/python-spfcheck2.svg)](https://travis-ci.com/niftylettuce/python-spfcheck2)\n[![code coverage](https://img.shields.io/codecov/c/github/niftylettuce/python-spfcheck2.svg)](https://codecov.io/gh/niftylettuce/python-spfcheck2)\n[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org)\n[![license](https://img.shields.io/github/license/niftylettuce/python-spfcheck2.svg)](LICENSE)\n[![npm downloads](https://img.shields.io/npm/dt/python-spfcheck2.svg)](https://npm.im/python-spfcheck2)\n\n\u003e Node.js wrapper around Python's spf.check2 function which conforms to both RFC4408 and RFC7208\n\n\n## Table of Contents\n\n* [Requirements](#requirements)\n* [Install](#install)\n* [Usage](#usage)\n* [Contributors](#contributors)\n* [License](#license)\n\n\n## Requirements\n\n1. Ensure that you have a Python version of \u003e= 3.5 installed per [pyspf][] requirements (note that Python v3 is required because of a bug with DNS recursive CNAME lookups on v2.7):\n\n   ```sh\n   python3 --version\n   ```\n\n2. Install the packages [pyspf][] and `dnspython`:\n\n   ```sh\n   pip3 install pyspf\n   pip3 install dnspython\n   ```\n\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install python-spfcheck2\n```\n\n[yarn][]:\n\n```sh\nyarn add python-spfcheck2\n```\n\n\n## Usage\n\n```js\nconst spfCheck2 = require('python-spfcheck2');\n\nconst ip = '69.55.226.139';\nconst address = 'terry@wayforward.net';\nconst host = 'mx1.wayforward.net';\n\n// then/catch usage\nspfCheck2(ip, address, host)\n  .then([result, explanation] =\u003e console.log(result, explanation))\n  .catch(console.error);\n\n// async/await usage\n(async () =\u003e {\n  try {\n    const [ result, explanation ] = await spfCheck2(ip, address, host);\n    console.log(result, explanation);\n  } catch (err) {\n    console.error(err);\n  }\n})();\n```\n\nNote that `result` is a String (which also corresponds to a particular `explanation`), see table below for the full list:\n\n| Result      | Explanation                                 |\n| ----------- | ------------------------------------------- |\n| `pass`      | `sender SPF authorized`                     |\n| `fail`      | `SPF fail - not authorized`                 |\n| `neutral`   | `permanent error in processing`             |\n| `softfail`  | `domain owner discourages use of this host` |\n| `permerror` | `permanent error in processing`             |\n| `temperror` | `temporary DNS error in processing`         |\n| `none`      |                                             |\n| `local`     | `No SPF result due to local policy`         |\n| `trusted`   | `No SPF check - trusted-forwarder.org`      |\n| `ambiguous` | `No error, but results may vary`            |\n\nAn error is thrown if the child process itself (`spf.check2`) errors.\n\n\n## Contributors\n\n| Name           | Website                    |\n| -------------- | -------------------------- |\n| **Nick Baugh** | \u003chttp://niftylettuce.com/\u003e |\n\n\n## License\n\n[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/)\n\n\n## \n\n[npm]: https://www.npmjs.com/\n\n[yarn]: https://yarnpkg.com/\n\n[pyspf]: https://pypi.org/project/pyspf/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforwardemail%2Fpython-spfcheck2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforwardemail%2Fpython-spfcheck2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforwardemail%2Fpython-spfcheck2/lists"}