{"id":15659594,"url":"https://github.com/kalloc/dkim","last_synced_at":"2025-05-05T19:41:19.239Z","repository":{"id":25363568,"uuid":"28791467","full_name":"kalloc/dkim","owner":"kalloc","description":"Golang DKIM Verifier","archived":false,"fork":false,"pushed_at":"2017-05-02T19:56:47.000Z","size":24,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T23:05:34.525Z","etag":null,"topics":["dkim","dkim-verifier","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kalloc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-05T01:01:40.000Z","updated_at":"2022-05-21T01:53:15.000Z","dependencies_parsed_at":"2022-08-24T04:31:05.718Z","dependency_job_id":null,"html_url":"https://github.com/kalloc/dkim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalloc%2Fdkim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalloc%2Fdkim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalloc%2Fdkim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalloc%2Fdkim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kalloc","download_url":"https://codeload.github.com/kalloc/dkim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252563796,"owners_count":21768523,"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":["dkim","dkim-verifier","go"],"created_at":"2024-10-03T13:17:43.229Z","updated_at":"2025-05-05T19:41:19.206Z","avatar_url":"https://github.com/kalloc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yet Another DKIM Verifier\n\n## Why not?\nI found some DKIM solution for go, but I don’t like untested C binding and I have some time (thank you mr.Putin)\nI wrote this code for my pet project.\n\n## What can we do?\n\nWe can verify DKIM headers very fast.\nIt is about 44mb per second on my laptop.\nWe support custom resolving and custom cache logic. \n\n## TODO\n- Support Length tag\n- Support Time\n- Support ExpireTime\n- Support Copied header fields (z=)\n- Sign\n\n## How to use it?\n\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/kalloc/dkim\"\n)\n\n// ./test path/to/emls/*.eml\n\nfunc main() {\n\tvar (\n\t\tfilename string\n\t\tfp       *os.File\n\t\terr      error\n\t\tdk       *dkim.DKIM\n\t)\n\n\tflag.Parse()\n\n\tfor _, filename = range flag.Args() {\n\t\tfmt.Printf(\"Check: %s — \", filename)\n\t\tif fp, err = os.Open(filename); err != nil {\n\t\t\tfmt.Printf(\"ERR-WRONG_FILE\")\n\t\t} else if dk, _ = dkim.ParseEml(bufio.NewReader(fp)); dk == nil {\n\t\t\tfmt.Printf(\"ERR-DKIM_NOT_FOUND\")\n\t\t} else if _, err = dk.GetPublicKey(); err != nil {\n\t\t\tfmt.Printf(\"ERR-DKIM_PK_NOT_FOUND\")\n\t\t} else if dk.Verify() == false {\n\t\t\tfmt.Printf(\"ERR-DKIM_NOT_VERIFIED (Body is %v, Sig is %v)\", dk.Status.ValidBody, dk.Status.Valid)\n\t\t} else {\n\t\t\tfmt.Printf(\"OK\")\n\t\t}\n\t\tfmt.Printf(\"\\n\")\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalloc%2Fdkim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkalloc%2Fdkim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalloc%2Fdkim/lists"}