Here are the instructions from the mail.python.org SpamBayes setup, as well as the train.sh script which drives the process. You will almost certainly need to modify the script somewhat and take the README with a grain of salt, but hopefully not too much (and hopefully only a very small grain).
Skip
train.sh
Description: Bourne shell script
README
Description: Binary data
_______________________________________________ SpamBayes@python.org https://mail.python.org/mailman/listinfo/spambayes Info/Unsubscribe: http://mail.python.org/mailman/listinfo/spambayes Check the FAQ before asking: http://spambayes.sf.net/faq.html