{"id":19608904,"url":"https://github.com/forwardemail/dkimpy","last_synced_at":"2025-04-27T20:33:10.278Z","repository":{"id":42367838,"uuid":"284606748","full_name":"forwardemail/dkimpy","owner":"forwardemail","description":"Node.js wrapper around the Python pip package dkimpy exposing DKIM and ARC signing and verification functions","archived":false,"fork":false,"pushed_at":"2023-12-07T02:23:56.000Z","size":444,"stargazers_count":3,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T16:12:28.475Z","etag":null,"topics":["arc","dkim","email","javascript","nodejs","pip","python","signing","verification"],"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}},"created_at":"2020-08-03T04:55:39.000Z","updated_at":"2024-01-10T13:46:03.000Z","dependencies_parsed_at":"2022-08-24T21:41:57.833Z","dependency_job_id":"3a2e708f-5708-4dc7-8e37-b524db28eb12","html_url":"https://github.com/forwardemail/dkimpy","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"4e541a80b8ea81d8d239bef8d5812cd6b154f3d9"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fdkimpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fdkimpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fdkimpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forwardemail%2Fdkimpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forwardemail","download_url":"https://codeload.github.com/forwardemail/dkimpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251204774,"owners_count":21552288,"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":["arc","dkim","email","javascript","nodejs","pip","python","signing","verification"],"created_at":"2024-11-11T10:18:31.235Z","updated_at":"2025-04-27T20:33:09.653Z","avatar_url":"https://github.com/forwardemail.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dkimpy\n\n[![build status](https://img.shields.io/travis/com/forwardemail/dkimpy.svg)](https://travis-ci.com/forwardemail/dkimpy)\n[![code coverage](https://img.shields.io/codecov/c/github/forwardemail/dkimpy.svg)](https://codecov.io/gh/forwardemail/dkimpy)\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/forwardemail/dkimpy.svg)](LICENSE)\n[![npm downloads](https://img.shields.io/npm/dt/dkimpy.svg)](https://npm.im/dkimpy)\n\n\u003e Node.js wrapper around the Python pip package dkimpy exposing DKIM and ARC signing and verification functions\n\n\n## Table of Contents\n\n* [Requirements](#requirements)\n* [Install](#install)\n* [Usage](#usage)\n  * [dkimVerify](#dkimverify)\n  * [arcVerify](#arcverify)\n  * [arcSign](#arcsign)\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 [dkimpy][] 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 package [dkimpy][] and [authres][] (`authres` is optional and used for ARC):\n\n   ```sh\n   pip3 install dkimpy authres\n   ```\n\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install dkimpy\n```\n\n[yarn][]:\n\n```sh\nyarn add dkimpy\n```\n\n\n## Usage\n\n### dkimVerify\n\n```js\nconst fs = require('fs');\n\nconst { dkimVerify } = require('dkimpy');\n\nconst message = fs.readFileSync('/path/to/example.eml');\n\n// then/catch usage\ndkimVerify(message)\n  .then(console.log)\n  .catch(console.error);\n\n// async/await usage\n(async () =\u003e {\n  try {\n    const result = await dkimVerify(message)\n    console.log(result);\n  } catch (err) {\n    console.error(err);\n  }\n})();\n```\n\nThe value of `result` is a Boolean which indicates if DKIM verification was successful for the first `DKIM-Signature` header found on the email.\n\nYou can pass a second argument of `index` (defaults to `0`, which means it looks for the first DKIM-Signature found).\n\n### arcVerify\n\n```js\nconst fs = require('fs');\n\nconst { arcVerify } = require('dkimpy');\n\nconst message = fs.readFileSync('/path/to/example.eml');\n\n// then/catch usage\narcVerify(message)\n  .then(console.log)\n  .catch(console.error);\n\n// async/await usage\n(async () =\u003e {\n  try {\n    const result = await arcVerify(message)\n    console.log(result);\n  } catch (err) {\n    console.error(err);\n  }\n})();\n```\n\nThe value of `result` is an enumerable String which is one of:\n\n* `\"none\"` indicates it does not have an ARC signature\n* `\"pass\"` indicates its ARC signature was verified successfully\n* `\"fail\"` indicates it had an ARC signature and it failed verification\n\n### arcSign\n\n```js\nconst fs = require('fs');\n\nconst { arcSign } = require('dkimpy');\n\nconst message = fs.readFileSync('/path/to/example.eml');\nconst selector = 'default'; // default._domainkey\nconst domain = 'example.com';\nconst srvId = 'mx.example.com';\nconst privateKeyFile = '/path/to/private.key';\n\n// then/catch usage\narcSign(message, selector, domain, privateKeyFile, srvId)\n  .then(console.log)\n  .catch(console.error);\n\n// async/await usage\n(async () =\u003e {\n  try {\n    const result = await arcSign(message, selector, domain, privateKeyFile, srvId)\n    console.log(result);\n  } catch (err) {\n    console.error(err);\n  }\n})();\n```\n\nThe value of `result` is a String with the new ARC headers to add to the top of the message (if any).\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[dkimpy]: https://pypi.org/project/dkimpy/\n\n[authres]: https://pypi.org/project/authres/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforwardemail%2Fdkimpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforwardemail%2Fdkimpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforwardemail%2Fdkimpy/lists"}