package dkim

  1. Overview
  2. Docs
Implementation of DKIM in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

dkim-0.3.0.tbz
sha256=887c87e54ffbba2119cacba4337e3b7abbebaf900099ffeffa372347f9316112
sha512=232f1b7ec7555338e4cef0d81de5f3da083e8afaba0e374581b933ad3dcf3ef635206041621f3e980d78da877d40693f15fb54c9e2f7b0197bd9762ebc16f9b1

Description

A library and a binary to verify and sign an email with the DKIM mechanism described by the RFC 6376

Published: 30 Nov 2021

README

ocaml-dkim

ocaml-dkim is a pure implementation of DKIM in OCaml. It permits to verify and sign an incoming email. It can be use as a SMTP filter service (verify) or as a SMTP submission service (sign).

How to install it?

You must have an OPAM environment. Then, ocaml-dkim can be installed with:

$ opam pin add https://github.com/dinosaure/ocaml-dkim.git

How to use it?

ocaml-dkim provides 2 binaries, one to verify, the second to sign an email.

$ dkim.verify test/raw/001.mail
[ok]: sendgrid.info
[ok]: github.com

It shows all domains which signed the given email and whether the signature is correct or not (for the last case, it shows you the selector). ocaml-dkim is able to sign an email from a private RSA key and a specific domain such as:

$ dkim.sign -k private-key.pem --selector admin --hostname x25519.net test/raw/001.mail
DKIM-Signature: ...
Rest of the email

It prints the signed email then. The user is able to use a specific RSA private key or it can use a seed used to generate the RSA private key with the fortuna random number generator.

ocaml-dkim has received funding from the Next Generation Internet Initiative (NGI) within the framework of the DAPSI Project.

Dependencies (19)

  1. x509 >= "0.6.3"
  2. mirage-crypto-pk >= "0.9.2" & < "1.0.0"
  3. mirage-crypto >= "0.9.2" & < "1.0.0"
  4. base64 >= "3.0.0"
  5. fpath
  6. rresult >= "0.7.0"
  7. fmt >= "0.8.7"
  8. logs
  9. cmdliner
  10. dns-client >= "6.0.0"
  11. domain-name
  12. hmap
  13. base-unix
  14. astring >= "0.8.5"
  15. ipaddr
  16. digestif >= "0.9.0"
  17. mrmime >= "0.5.0" & < "0.6.0"
  18. dune >= "2.0.0"
  19. ocaml >= "4.08.0"

Dev Dependencies (2)

  1. alcotest with-test
  2. mirage-crypto-rng with-test & < "0.11.0"

Used by (1)

  1. dkim-mirage = "0.3.0"

Conflicts

None

OCaml

Innovation. Community. Security.