package spf

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module SpfSource

OCaml bindings to libspf2. It is strongly recommended that a patched libspf2 with fixes sent to the SPF-devel mailing list is used instead of the current official libspf2 release (version 1.2.9).

Sourcetype server

The type of SPF server instances.

Sourcetype dns =
  1. | Dns_resolv
  2. | Dns_cache
  3. | Dns_zone

The DNS scheme to be used by SPF.

Sourcetype request

The type of SPF requests.

Sourcetype response

The type of SPF responses.

Sourcetype comments

The type of SPF comments.

Sourcetype reason

The type of SPF reason.

Sourcetype result =
  1. | Invalid
  2. | Neutral of comments
  3. | Pass
  4. | Fail of comments
  5. | Softfail of comments
  6. | None
  7. | Temperror
  8. | Permerror

The type of SPF results.

Sourceexception Error of string

Exception raised by SPF functions in case of errors.

Sourceval server : ?debug:bool -> dns -> server

Allocates a new SPF server instance.

Sourceval free_server : server -> unit

Frees memory allocated to the given server.

Sourceval request : server -> request

Create a new SPF request.

Sourceval free_request : request -> unit

Frees memory allocated to the given request.

Sourceval check_helo : server -> Unix.inet_addr -> string -> response

check_helo spf addr helo performs an SPF check on address addr on the SPF record for the HELO name helo using SPF server spf.

Sourceval check_from : server -> Unix.inet_addr -> string -> response

check_helo spf addr from performs an SPF check on address addr on the SPF record of the domain of the MAIL FROM address from.

Sourceval result : response -> result

Extracts an result from an response.

Sourceval reason : response -> reason

Extracts an reason from an response.

Sourceval received_spf : response -> string
Sourceval received_spf_value : response -> string

Extracts the Received-SPF header value from an response.

Sourceval header_comment : response -> string

Extracts the comment part of the Received-SPF header value from an response.

Sourceval smtp_comment : comments -> string

Extracts the SMTP comment part from comments.

Sourceval explanation : comments -> string

Extracts the explanation part from comments.

Sourceval string_of_result : result -> string

Converts an result to a string.

Sourceval string_of_reason : reason -> string

Converts an reason to a string.