Skip to content

redsift/spf

This branch is 170 commits ahead of, 9 commits behind zaccone/spf:master.

Folders and files

NameName
Last commit message
Last commit date
Mar 7, 2025
Mar 6, 2025
Sep 5, 2023
Dec 17, 2024
Jan 2, 2023
Dec 3, 2022
Nov 5, 2015
Dec 3, 2022
Mar 22, 2019
Dec 17, 2024
Mar 20, 2024
Dec 3, 2022
Mar 7, 2025
Mar 7, 2025
Oct 12, 2023
Mar 5, 2025
Mar 6, 2025
Dec 17, 2024
Sep 4, 2023
Jun 15, 2018
Dec 17, 2024
Mar 11, 2025
Mar 5, 2025
Aug 22, 2023
Dec 17, 2024
Mar 6, 2024
Mar 5, 2025
Aug 10, 2023
Aug 9, 2023
Aug 10, 2023
Mar 6, 2025
Mar 6, 2025
Mar 5, 2025
Dec 3, 2022
Apr 23, 2018
Oct 11, 2023
Oct 11, 2023
Dec 3, 2022
Dec 3, 2022

Repository files navigation

Sender Policy Framework

A comprehensive RFC7208 implementation

Build Status Go Report Card GoDoc

About

The SPF Library implements Sender Policy Framework described in RFC 7208. It aims to cover all rough edge cases from RFC 7208. Hence, the library does not operate on strings only, rather "understands" SPF records and reacts properly to valid and invalid input. Wherever I found it useful, I added comments with RFC sections and quotes directly in the source code, so the readers can follow implemented logic.

Current status

The library is still under development. API may change, including function/methods names and signatures. I will consider it correct and stable once it passess all tests described in the most popular SPF implementation - pyspf.

Testing

Testing is an important part of this implementation. There are unit tests that will run locally in your environment, however there are also configuration files for named DNS server that would be able to respond implemented testcases. (In fact, for the long time I used a real DNS server with such configuration as a testing infrastructure for my code). There is a plan to implement simple DNS server that would be able to read .yaml files with comprehensive testsuite defined in pyspf package. Code coverage is also important part of the development and the aim is to keep it as high as 9x %

Dependencies

SPF library depends on another DNS library. Sadly, Go's builtin DNS library is not elastic enough and does not allow for controlling underlying DNS queries/responses.

Pull requests & code review

If you have any comments about code structure feel free to reach out or simply make a Pull Request

redsift/spf fork

It started as a PR to the original lib, but eventually we added some functionality, that might not be backward compatible with it, and thus we consider it as mostly separate project.