--- category: '' date: 2007/03/15 19:28 description: '' link: '' priority: '' slug: '46' tags: RaSPF, programming, python title: 'RaSPF: A C SPF library' type: text updated: 2007/03/15 19:28 url_type: '' --- Description ----------- RaSPF is a C port of the excellent PySPF_ Python library. Goals ----- RaSPF aims to be: * Compliant to the SPF_ RFC_ and ammendments. For that goal, I am making extensive use of test suites, and right now it passes all the tests in the official SPF test suite, and has no divergences with PySPF in over 300 tests. * Solid. I am making extensive use of tools like Valgrind, and libraries to handle dictionaries and strings, trying to avoid the common pitfalls of C. * Maintained. Once the first two goals are achieved, this one should be easy, since only tracking standard changes will be necessary. * Responsive to user requests. You have a problem? Please let me know! I **want** people to use RaSPF, and I want it to be GOOD. Please use the `Google issue tracker`_ for the project. * Inclusive. I will happily give SVN write access to anyone who asks for it and shows his mettle with a patch for an outstanding issue. * Well documented. This is the weakest point right now, and the next thing to be attacked after compliance is achieved. You can help by doing things in the `Google Wiki`_ of the project. * Freely usable. The code is under the Python License, which is a MIT/BSD style license. However, I am using EXCC which is under the GPL. That makes the whole library GPL for all practical purposes. The EXCC author is investigating relicensing, so this problem should go away soon. Right now, don't use RaSPF on anything that's not GPL. Usage ----- You have two choices: a. Use the spf_check function. Read the raspfquery sources for an example. b. Use the spf_query object and all the spf_query_* functions. The API is similar to PySPF's. Compiling --------- * You need a C compiler and CMake_ * Enter the sources folder, and run ``./build.sh`` Getting RaSPF ------------- At the moment, there is no official release, until the SPF test suite is passed. I don't intend to encourage use of non-compliant software. However, for testing purposes, you can use the SVN code at the `Source Page`_ at google code. .. _cmake: http://www.cmake.org .. _spf: http://www.openspf.org .. _rfc: http://www.openspf.org/Specifications .. _google issue tracker: http://code.google.com/p/raspf/issues/list .. _Google Wiki: http://code.google.com/p/raspf/w/list .. _Source Page: http://code.google.com/p/raspf/source .. _pyspf: http://pymilter.sf.net