package uspf
SPF implementation in OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
uspf-0.0.3.tbz
sha256=9e7903a149b1a9708bf33d0b34ea243172feebe60737e81522f487711e910568
sha512=d95c6b61ded3b5fff91a13ab2ea9df43ccec26f0f5fd52fe4f6561575313898947a24b591fb85ea697fd703bd402af494491de5d5e9e0b18c6954c33f92f439f
doc/src/uspf.unix/uspf_unix.ml.html
Source file uspf_unix.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
module Unix_scheduler = Uspf.Sigs.Make (struct type 'a t = 'a end) let state = let open Uspf.Sigs in let open Unix_scheduler in { return = (fun x -> inj x); bind = (fun x f -> f (prj x)) } module DNS = struct type t = Dns_client_unix.t and backend = Unix_scheduler.t and error = [ `Msg of string | `No_data of [ `raw ] Domain_name.t * Dns.Soa.t | `No_domain of [ `raw ] Domain_name.t * Dns.Soa.t ] let getrrecord dns response domain_name = Unix_scheduler.inj @@ Dns_client_unix.get_resource_record dns response domain_name end module Flow = struct type flow = in_channel and backend = Unix_scheduler.t let input ic tmp off len = Unix_scheduler.inj @@ input ic tmp off len end let ( >>| ) x f = Result.map f x let check ?nameservers ~timeout ctx = let dns = Dns_client_unix.create ?nameservers ~timeout () in Uspf.get ~ctx state dns (module DNS) |> Unix_scheduler.prj >>| fun record -> Uspf.check ~ctx state dns (module DNS) record |> Unix_scheduler.prj let extract_received_spf ?newline ic = Uspf.extract_received_spf ?newline ic state (module Flow) |> Unix_scheduler.prj
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>