PackageTrack
Sign in Get early access

mlocati/spf-lib

Parse, build and validate SPF (Sender Policy Framework) DNS records

3.3.0 1.0M downloads/mo #4699 most downloaded on Packagist mlocati/spf-lib

What this package is like to depend on

Last release 1 years ago

23 Jun 2025

Ships unpredictably

gaps range from 8 days to 2.5 years

Most releases are documented

notes for 10 of 12 stable releases

Nothing withdrawn

no release was ever pulled

6 years old

12 releases · first in 2020

0 releases in the last 12 months

see the full history below

Release timeline

12 releases · Jul 2020 to Jun 2025
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 12
  1. 3.3.0 23 Jun 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.2.0...3.3.0

    Open source →
  2. 3.2.0 27 Feb 2025
    Release notes

    What's Changed

    • Add support for PHP up to 8.4 by @mlocati in #35 and in #38
    • Include more information about DNS lookups in OnlineSemanticValidator by @fyrts in #37

    New Contributors

    Full Changelog: 3.1.2...3.2.0

    Open source →
  3. 3.1.2 09 Sep 2022
    Release notes
    • Fix typo in getEnvironment method name (#27)
    Open source →
  4. 3.1.1 07 Feb 2021
    Release notes
    • Support PHP 7.1 too
    Open source →
  5. 3.1.0 17 Nov 2020
    Release notes
    • Added OnlineSemanticValidator to check for issues in real world - see the docs
    Open source →
  6. 3.0.1 21 Oct 2020
    Release notes

    Bug fixes

    • fixed a bug when checking MX mechanisms (see #15 - thanks @kanarip!)
    Open source →
  7. 3.0.0 17 Jul 2020
    Release notes

    New features

    • The semantic validation now also reports usages of "p" (validated domain) macro-letter (which should be avoided)

    Bug fixes

    A ton of bug fixes have been addresses thanks to the usage of the OpenSPF Test Suite for RFC 7208
    The most notable ones are:

    • correct handling of upper and lower case characters in SPF strings
    • when checking an SPF record, we now have a limit of 2 for void DNS lookups
    • the code now accepts more that one delimiter in macro-expand strings
    • the expansion of exp modifier is now URL encoded (if the macro-string states so)

    Breaking changes

    • The getPTRRecords() method of the DNS Resolver interface changed its signature (you have to update your code if you are using a custom DNS resolver)
    Open source →
  8. 2.0.1 15 Jul 2020
    Release notes
    • Improved handling of internationalized domain names in the DNS resolver
    Open source →
  9. 2.0.0 15 Jul 2020
    Release notes

    New features

    • You can now use this library to check the validity of an IP address/sender domain (see README.md)
    • When checking for semantic issues, you can now filter for the minimum issue level

    Bug fixes

    • The library now handles SPF records in a case-insensitive way (as per RFC 7208)

    Breaking changes

    • New methods have been added to the DNS Resolver interface (you have to implement them if you are using a custom DNS resolver)
    • When parsing an SPF record, the library now also checks the syntax of the mechanism/modifier arguments, throwing a new SPFLib\Exception\InvalidMacroStringException exception (which extends the SPFLib\Exception\InvalidTermException exception) in case of problems
    • Cloning instances of SPFLib\Record now clones the contained terms too
    • The result of the getDomainSpec() method of the a/exists/include/mx/ptr mechanisms and the exp/redirect modifiers is now an instance of the new SPFLib\Macro\MacroString class instead of a string (to get their string representation simply use (string) $mechamism->getDomainSpec()); the same applies for the result of the getValue() method of the unknown modifier
    Open source →
  10. 1.0.2 08 Jul 2020
    Release notes
    • Fix decoding SPF record from a domain
    Open source →
  11. 1.0.1 08 Jul 2020

    Nothing published for this version

  12. 1.0.0 08 Jul 2020

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive