[go: up one dir, main page]

package uspf

  1. Overview
  2. Docs
SPF implementation in OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

uspf-0.2.1.tbz
sha256=e4e7ecd1422ce2c0baa5da982f58ec4f1986913772f1cd16bf24f46b4b411f95
sha512=02dfe40a2e5d8b3c4f361cb9a78f96e437a4fc4de36a7256b0c4f1af7b1efa15525e219219d9fef9a54518162f3c4fae68e32ca5aa7b10cd4673245ccd690335

Description

uspf is an implementation of the SPF verifier in OCaml compatible with MirageOS.

Added to opam-repository:

README

µSPF, a SPF verifier/signer in OCaml

uspf is a simple library to check or sign an incoming emails from -data. See RFC 7208.

Usage

How to install it?

You must have an OPAM environment. Then, uspf can be installed with:

$ opam install uspf

How to use it?

uspf is a little tool which can be used to verify DNS records from some informations (like where comes from the incoming email - especially, what is the IP address of the sender).

From these informations and the DNS record, we are able to check if the IP address is allowed to send an email under a certain domain-name.

By this way, uspf requires:

  • few informations (the IP address of the sender, its domain-name, etc.)
  • a DNS stack to get records
(* Informations required by uSPF *)
let ctx =
  Uspf.empty
  |> Uspf.with_sender (`MAILFROM address)
  |> Uspf.with_ip ipaddr

(* DNS record *)
let record = Uspf.get ctx sched dns (module DNS)

(* Verification *)
let result = Uspf.check ctx sched dns (module DNS)

From the result, the user is able to emit a new RFC822 field via mrmime:

let field_name, value = Uspf.to_field ~ctx ?receiver result
let () =
  Format.printf "%s: %s\n%!"
    (Mrmime.Field_name.to_string field_name)
    (Unstrctrd.to_utf_8_string value)

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

Dependencies (13)

  1. fmt >= "0.8.9"
  2. dns-client >= "6.1.0"
  3. lwt
  4. dns >= "5.0.1"
  5. domain-name
  6. angstrom >= "0.15.0"
  7. hmap
  8. ipaddr >= "5.2.0"
  9. mrmime >= "0.5.0"
  10. colombe >= "0.13.0"
  11. logs
  12. dune >= "2.8.0"
  13. ocaml >= "4.12.0"

Dev Dependencies (2)

  1. rresult >= "0.7.0" & with-test
  2. alcotest with-test

Used by (3)

  1. dmarc
  2. uspf-lwt >= "0.2.1"
  3. uspf-mirage >= "0.2.1"

Conflicts

None