package dkim

  1. Overview
  2. Docs
Implementation of DKIM in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

dkim-v0.2.0.tbz
sha256=6764cf63de6becdcb4979e81e246369db1dd0b2009fb114f187a65e6e4dfeae6
sha512=19855ff8a878f7c00ecca9c969a7cd8fad6ecee444f6645cec19d0969773873b5c61956c2e1a65da3290241f90b5379bcf18258647d16305b73ad1667a18fc04

Description

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

Published: 27 Apr 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.

Dependencies (17)

  1. x509 >= "0.15.0"
  2. mirage-crypto-pk >= "0.10.3" & < "1.0.0"
  3. mirage-crypto >= "0.10.3" & < "1.0.0"
  4. base64 >= "3.0.0"
  5. fpath
  6. fmt
  7. logs
  8. cmdliner
  9. dns-client >= "5.0.0" & < "6.0.0"
  10. domain-name < "0.3.1"
  11. hmap
  12. base-unix
  13. ipaddr
  14. digestif >= "0.9.0"
  15. mrmime >= "0.3.1" & < "0.5.0"
  16. dune >= "2.0.0"
  17. 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.2.0"

Conflicts

None

OCaml

Innovation. Community. Security.