The default Mail program for the iPhone does a wonderful job at providing easy, integrated access to email. However, it lacks in one particular area, which is likely what drove you to search for an iPhone spam filter.
The default iPhone mail program simply does not have a built-in spam filter. There are many reasons why Apple may have chosen to leave this detail out, the most likely being the fact that most email services have their own built-in spam filter. This is especially true for services such as Gmail which users commonly use on the iPhone.
Users of services with less spam protection such as Yahoo and Windows Live Mail, likely find themselves needing an iPhone spam filter. Due to program restrictions by Apple, there is no way to release an iPhone spam filter on the iPhone. This was confirmed by the creator of the popular Spam Filter, SpamSieve, when he confirmed there is no planned iPhone version because Apple does not allow programs to interact with the native mail application.
While there may not be an iPhone spam filter, there are still powerful email services such as Gmail which have spam protection. This guide will teach you how to set up a Google Mail (Gmail) account and get it running on your iPhone, this is currently the easiest and best iPhone spam filter available.