Expand description
This crate is responsible for providing tools to parse and validate Spf Records.
When the builder
features is enabled access to the SpfBuilder struct and related
functions is provided.
For a list of supported Modifiers and Mechanism. See Kind
This crate is able to deconstruct v=spf1
and spf2.0
records. Note: Spf2.0 records are
essentially defunct are its support is for historical reasons and may be removed in a future release.
§Abilities:
- Check and Set Spf record version. See:
Spf Versions
- Check and Create Spf Mechanism/Modifiers:
§Feature Flags:
ptr
(Enabled by default.)
Theptr
mechanism is highly discouraged. If you want to allow it without warnings, then you should provide the--no-default-features
option.strict-dns
(Disabled by default.) This enables syntactical checking of Domain Names.- When enabled it changes the behaviour of
FromStr
forMechanism<String>
andParsedMechanism
. By default,rrdata
is not checked.
Whenstrict-dns
is enabled an invalid domain host will be seen as Hard error. Any additional parsing will be halted.
- When enabled it changes the behaviour of
builder
(Disabled by default.)
This enables the use of SpfBuilder and its related features
You are able to convert andSpf<String>
into()
anSpfBuilder
Struct.spf2
(Disabled by default)
This enables the ability to programmatically create Spf2 (SenderID) records. As this has become defunct. There is no real need for it. But it remains as an option if desired.serde
(Disabled by default.)
Modules§
- This module contains the tools and functions to dealing with Mechanisms found within a Spf DNS record.
Structs§
- Base struct for an Spf of any type.
- SpfBuilder
builder
The definition of the SpfBuilder struct which contains all information related a single SPF record. - Contains a vector of parsing or validation errors which are represented using various SpfError codes.
Enums§
- A list of expected and possible errors for SPF records.