Perhaps you could include a link with a good open source 3rd party tool like Spam Sieve instead of building spam filtering yourself, since doing so it a huge task. But meanwhile perhaps it's worth considering what Spam filtering tools play nicely with MailButler.