Ok, the SPF implementation situation is kinda pathetic.
There seems to be exactly one maintained C implementation. And it's windows-only.
libspf's website seems to have disappeared
libspf2's not RFC-compliant (verified for 1.2.5) and their issue reporting system bounces.
So, I have taken the most compliant one I found whose code I can actually follow (that would be the python one) and am reimplementing it in C (using bstrlib and libdjbdns).
It will probably not come to a good end, but hey, it may work ;-)
Curious why djbdns was chosen given DJB's reputation for non-free licensing (djb license), technical inferiority and standards noncompliance (djbftpd)?
Paul: libdjbdns is public domain, so the non-free is bunk in this case.
The technical inferiority... have you actually seen libdjbdns? The only big problem is lack of ipv6.
The main thing is: it's very easy to use. it adds no complexity to the project. Later on, it can be replaced if needed.
anon: libspf2 is partly undocumented, the API is way more complex than it needs to be (compare it with pyspf), is buggy (see my previous post), and the bug reporting email address bounces, so I can't actually trust anything to be fixed.