-
Add
-
SpfBuilder now ensures that only unique mechanisms are added to a given Mechanism
<T>. Adding duplicates programmatically is not possible. This is handled silently. There is no warning. -
SpfBuilder function
build()does validation as part of its Spf creation. No additional validation is required.
-
-
Note:
- The append_mechanism() function is quite loose in its behaviour. This is to say rules regarding "redirect" and " all" are ignored. You can freely add both mechanisms to an SpfBuilder struct.
- add_redirect() and add_all() return SpfBuilder in different states. This prevents a "redirect" or "all" from both being present. I am considering his may well be over engineered.
- Add
- spf.lookup_count()
Spf<String>now contain the number of lookup that will be needed given its definition. - Tests and serde checks updated.
- For informative documentation for spf.validate() also added.
- spf.lookup_count()
- Fix
-
TryFrom
Spf<String>to SpfBuilder
The original code was actually incomplete. This has been corrected and tests have been added.-
Note: TryFrom traits
TheTryFromtrait was used for anyMechanism<String>as these have the potential to fail if an incorrectMechanism<T>is passed.\Example:
"mx" is aMechanism<String>and can not be converted toMechanism<IpNetwork>
-
-
- Breaking Changes
Spfstruct renamed toSpfBuilderand placed behind abuilderflag.- New simplified
Spf<T>struct defined. - New Spf Implementation.
-
Add
iter()functionality forSpf&SpfBuilderFromimplementations- From
Mechanism<IpNetwork>forMechanism<String> - From
Mechanism<All>forMechanism<String> - From
Spf<String>forSpfBuilder
- From
trait Appendable- This provides a dynamically dispatched
append()function that accepts either aMechanism<String>orMechanism<IpNetwork>
- This provides a dynamically dispatched
validate()forSpf<String>- This function returns either
()or aSpfErrors
- This function returns either
-
Fix
Mechanism<IpNetwork>- This Mechanism now correctly returns IP Addresses and Networks.
Previously
ip4:192.168.1.10would later be returned asip4:192.168.1.10/32. This has now been corrected for both ip4 and ip6.
- This Mechanism now correctly returns IP Addresses and Networks.
Previously
- Add Serialize and Deserialize Support
- Requires the serde feature to be enabled.
- Add support to Mechanism
existfor Macro Expansion. Strings starting with%will now be matched. Support contributed by 22ca54d00f05391d6ffee4bc23a5ba60
- Remove code which has been deprecated since 0.2.0
- Implement
strict-dnsfeature- Use crate
addrto validate domain information fora,mx,ptr,include, andexists - See:
examples/build-spf-strict.rs
- Use crate
- Deprecate
Mechanism::new_functions. - Breaking Change: Rename some
MechanismError::messages.
- Add
#[cfg(feature = warn-dns)]to code documentation to remove warnings and errors when feature is not enabled.
- Add Feature (warn-dns)
With this feature enabled any malformed DNS records will causehas_warnings()to be set totrue. Their values can then be accessed usingwarnings(). Even though they are invalid. No error will be generated.
- Documentation Update
- as_spf() removed. Replaced with a Display trait. Use
to_string() - .parse() removed. Replaced with FromStr trait. Use
parse::<Spf>()
- Bump Version to 0.2.0
- Add this CHANGELOG.md file.
- Complete re-orginisation of the crate's module layout.
- Note that spf::{qualifier::Qualifier, kinds::MechanismKind, mechanism::Mechanism} no longer exist. These can now
be accessed more simply as:
- mechanism::{Qualifer, Kind, Mechanism}
- Note that spf::{qualifier::Qualifier, kinds::MechanismKind, mechanism::Mechanism} no longer exist. These can now
be accessed more simply as:
- Correct license reference to correctly show as MIT license
- Introduced ability to build SPF records programmatically.
- See examples/build-new-spf.rs
- Implemented Display trait for structs Spf and Mechanism
- This also depreciates the previously implemented as_spf() and string() methods.
- implemented FromStr trait for Struct Spf
- Implemented Errors for
Mechanism - Improved regular expressions to handle more strings when parsing.