These might be starting to get dated a little but I think that if you look at the "Extending Apache SpamAssassin Using Plugin" slides and notes from here: http://people.apache.org/~parker/presentations/index.html
That will give you a good idea on what you need to accomplish for your plugin. Michael