{"id":29724710,"url":"https://github.com/t0gun/go-spf","last_synced_at":"2025-08-18T17:13:03.856Z","repository":{"id":289520992,"uuid":"967423220","full_name":"t0gun/go-spf","owner":"t0gun","description":"Go library for analyzing, and evaluating SPF records","archived":false,"fork":false,"pushed_at":"2025-07-29T02:49:32.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-29T04:36:42.609Z","etag":null,"topics":["email-verification","go","library","spf"],"latest_commit_sha":null,"homepage":"","language":"Go","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/t0gun.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,"zenodo":null}},"created_at":"2025-04-16T12:38:51.000Z","updated_at":"2025-07-29T02:49:32.000Z","dependencies_parsed_at":"2025-07-01T23:26:20.294Z","dependency_job_id":"c27c59e1-a927-4643-8282-e3ea9a932de3","html_url":"https://github.com/t0gun/go-spf","commit_stats":null,"previous_names":["apprentice-system/go-spf","apprentice-system/spf","mailspire/spf","t0gun/go-spf"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/t0gun/go-spf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0gun%2Fgo-spf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0gun%2Fgo-spf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0gun%2Fgo-spf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0gun%2Fgo-spf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t0gun","download_url":"https://codeload.github.com/t0gun/go-spf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0gun%2Fgo-spf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271027687,"owners_count":24687082,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["email-verification","go","library","spf"],"created_at":"2025-07-24T21:39:05.748Z","updated_at":"2025-08-18T17:13:03.847Z","avatar_url":"https://github.com/t0gun.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-spf\n\n[![CI](https://github.com/t0gun/go-spf/actions/workflows/go-test.yaml/badge.svg?branch=main)](https://github.com/t0gun/go-spf/actions/workflows/go-test.yaml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/t0gun/go-spf.svg)](https://pkg.go.dev/github.com/t0gun/go-spf)\n\nRFC 7208 compliant Go library for parsing and evaluating SPF records.\n\u003e Requires go 1.23.x or later\n\n\u003e **Warning**\n\u003e This project is an early proof of concept. The evaluator currently supports `ip4`, `ip6` and `all` mechanisms with\n\u003e left-to-right, first-match semantics. It returns the qualifier of the first matching mechanism and falls back to\n`Neutral` only when nothing matches. Features like `include`, `a`, `mx`, `exists`, `ptr`, `redirect`, DNS lookup limits\n\u003e and macros are not implemented yet.\n\n## Installation\n\n```shell\ngo get github.com/t0gun/go-spf\n```\n\n## Usage\n\n### Checking a host\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\n\t\"github.com/t0gun/go-spf\"\n)\n\nfunc main() {\n\tip := net.ParseIP(\"192.0.2.1\")\n\tres, err := spf.CheckHost(ip, \"example.com\", \"alice@example.com\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(res.Code)\n}\n```\n\n### Parsing a record\n\nThe parser lives in its own subpackage and can be used directly if you only\nneed to read an SPF record.\n\n```go\nimport \"github.com/t0gun/go-spf/parser\"\n\nrec, err := parser.Parse(\"v=spf1 ip4:203.0.113.0/24 -all\")\nif err != nil {\n// handle parse error\n}\nfmt.Printf(\"%+v\\n\", rec)\n```\n\n## Contributing\n\nPlease feel free to submit issues, fork the repository and send pull requests!\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft0gun%2Fgo-spf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft0gun%2Fgo-spf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft0gun%2Fgo-spf/lists"}