{"id":14988197,"url":"https://github.com/apache/james-jdkim","last_synced_at":"2026-03-01T04:06:07.522Z","repository":{"id":3960490,"uuid":"5054234","full_name":"apache/james-jdkim","owner":"apache","description":"Mirror of Apache James jdkim","archived":false,"fork":false,"pushed_at":"2025-10-13T04:56:06.000Z","size":2603,"stargazers_count":22,"open_issues_count":2,"forks_count":38,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-10-29T00:50:03.916Z","etag":null,"topics":["james","java","mail","network-server"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.adoc","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":"2012-07-15T07:00:28.000Z","updated_at":"2025-10-13T04:56:11.000Z","dependencies_parsed_at":"2024-07-26T13:06:35.567Z","dependency_job_id":"490e051c-1af9-4ede-864b-737ae9b60735","html_url":"https://github.com/apache/james-jdkim","commit_stats":{"total_commits":179,"total_committers":13,"mean_commits":13.76923076923077,"dds":0.4134078212290503,"last_synced_commit":"4b0b365b85847a83c3e09f5538fb9c6279a6c891"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/apache/james-jdkim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fjames-jdkim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fjames-jdkim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fjames-jdkim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fjames-jdkim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/james-jdkim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fjames-jdkim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29960157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"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":["james","java","mail","network-server"],"created_at":"2024-09-24T14:16:16.842Z","updated_at":"2026-03-01T04:06:07.479Z","avatar_url":"https://github.com/apache.png","language":"Java","readme":"= JAMES jDKIM library\n\n\nLibrary dealing with parsing and crytography to sign and verify DKIM signatures.\n\nThe mailet has been moved to James project: https://github.com/apache/james-project/tree/master/server/mailet/dkim\n\n== Usage\n\nA full example is available in\nhttps://github.com/apache/james-jdkim/blob/master/main/src/test/java/org/apache/james/jdkim/DKIMTest.java[DKIMTest]\n\n=== Signing\n\nSigning a mime message can be achieved using the following snippet\n\n[source,java]\n----\nimport java.io.InputStream;\nimport java.security.PrivateKey;\n\nString signatureTemplate = \"v=1; a=rsa-sha256; c=simple; d=messiah.edu; h=date:from:subject; q=dns/txt; s=selector2;\";\n\nPrivateKey privateKey = null;\nDKIMSigner dkimSigner = new DKIMSigner(signatureTemplate, privateKey);\n// You need to provide the input stream of the mime message, it will be parsed\n// by mime4j\nInputStream stream = null;\nString signature = dkimSigner.sign(inputStream);\n// `signature` contains the full header\n// DKIM-Signature: a=rsa-sha256; q=dns/txt; b=Axa8s/g...U1SIw==; c=simple; s=selector2; d=messiah.edu; v=1; bh=6pQ...6g=; h=date:from:subject;\n----\n\nMore advanced usage such as including multiple signatures can be found in\nhttps://github.com/apache/james-jdkim/blob/master/main/src/test/java/org/apache/james/jdkim/DKIMTest.java[DKIMTest]\n\n=== Verifying\n\nVerifying a mime message DKIM signatures can be achieved using the following\nsnippet. The verifier always verifies all the signatures.\n\n[source,java]\n----\nimport java.io.InputStream;\n// You can override the resolver in the constructor, use your own\n// implementation of a retriever or use multiple implementations using a\n// `MultiplexingPublicKeyRecordRetriever`\nPublicKeyRecordRetriever keyRecordRetriever = new DNSPublicKeyRecordRetriever();\nDKIMVerifier verifier = new DKIMVerifier(keyRecordRetriever);\nInputStream stream = null; // you need to provide the input stream of the mime message\nList\u003cSignatureRecord\u003e verifiedSignatures = verifier.verify(stream);\n// `verifiedSignatures` contains only the signatures that have successfully\n// passed the validation.\n// If you want to query all the results including all the failures, you can\n// retrieve them from the verifier\nList\u003cResult\u003e results = verifier.getResults();\n----\n\n== Cryptography Notice\n\n----\n   This distribution includes cryptographic software.  The country in \n   which you currently reside may have restrictions on the import, \n   possession, use, and/or re-export to another country, of \n   encryption software.  BEFORE using any encryption software, please \n   check your country's laws, regulations and policies concerning the\n   import, possession, or use, and re-export of encryption software, to \n   see if this is permitted.  See http://www.wassenaar.org for more\n   information.\n\n   The U.S. Government Department of Commerce, Bureau of Industry and\n   Security (BIS), has classified this software as Export Commodity \n   Control Number (ECCN) 5D002.C.1, which includes information security\n   software using or performing cryptographic functions with asymmetric\n   algorithms.  The form and manner of this Apache Software Foundation\n   distribution makes it eligible for export under the License Exception\n   ENC Technology Software Unrestricted (TSU) exception (see the BIS \n   Export Administration Regulations, Section 740.13) for both object \n   code and source code.\n\n   The following provides more details on the included cryptographic\n   software:\n    \t\t\n    - jDKIM includes code designed to work with Java SE Security\n\n    Export classifications and source links can be found\n    at http://www.apache.org/licenses/exports/.\n----","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fjames-jdkim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fjames-jdkim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fjames-jdkim/lists"}