To compile:
gcc -o spamtestbuddy -s -O2 -Wall -pedantic spamtestbuddy.c

Copy the binary to install it. Before SpamTestBuddy does anything, you 
have to create a .spamtestbuddy file in $HOME. This will define all 
aspects of the scoring. See the SAMPLE-spamtestbuddy file for details.

At the very least, define
	SpamThreshold
	SkipReceived
	TestDnsProblems
	and at least another Tests (e.g. the result from an existing filter)

Try it out by reading an email from the command line:
./spamtestbuddy < message

You should see two new headers, such as
X-SpamTestBuddy: OVER score=2.9075 threshold=1.5000 ip=60.18.212.53
X-SpamTestBuddy-Tests: ver=0.93 +DNSPROBLEM +SPAMPROBE +ZEN

(In this example, SpamTestBuddy has picked up the 0.9075 score from
SpamProbe and added another 2 due to bad reverse dns, and the ZEN rbl).

Finally, install in .procmailrc with this single recipe:

:0 wf
| $HOME/spamtestbuddy

This will add the new header. You should obviously run this after using
other software like SpamProbe whose headers are needed by SpamTestBuddy.

If you want to parse the sender's IP address to a variable, this can 
easily be done after the SpamTestBuddy header is added. For example:

:0
* ^X-SpamTestBuddy: .*ip=\/[0-9.]*
{ SENDER_IP=$MATCH }

The IP address parsed from the correct Received header is now in $SENDER_IP

