I had written my own and it did a decent job but it required keeping your blacklist constantly updated. So the next step was to make it a bit more intelligent and I simply haven't had the time...
At the time however, I was looking at this
http://www.sng.ecs.soton.ac.uk/mailscanner/
Never got around to testing it out but I think it will do what you're looking for.