I don't know about NFS, but what do you mean about SPAM-filter?
If "how to write own plugin" - it is CP-API, which was published about a year ago.
If "how to set up bayesit" - the page is fully available in Russian, and now I am translating it into English.
It will be placed at
, and you can periodically check this URL.