To install SPF, do the following:
If you are using John Simpsons qmail-smtpd-run script SPF Checking is now done within his script at the SMTP level. See his web page for additional configuration information.
tar xvzf Mail-SPF-Query-1.997.tar.gz
perl Makefile.PL && make && make install
You can test this installation (and that PER5LIB is set correctly) with perl -e 'require Mail::SPF::Query'.
Now we can let spamassassin check for SPF headers