For like the last two weeks I have woken up every morning to a piece of comment spam on my blog. ["Comment spammers" are people that come and leave advertisements in your blog comments with links to their spammy web sites. Putting these links in blogs helps them get higher Google rankings.] Last night I did a little research on ways to prevent it. Jay Allen has an article on how to stop it, which I started to implement, but then I realized his solution only prevents the spammy comments from showing -- they can still leave them. I don't even want them to be able to submit them to my database. So, I made this little hack to the source code with a few changes: I test the body as well as the URL field, and I am currently matching on 'zipcode', 'discount-life-insurance' and 'penis', which seem to be my most frequent spammers (what have they heard???). If my spam problem gets worse, then maybe I'll expand it to automatically pull in the various blacklists out there and match against those. I also followed the this suggestion to rename the mt-comments.cgi so that automatic comment spamming robots would not be able to easily find me. That solution is probably most effective for right now, but it's only a matter of time until the robots figure out how to parse your main page and deduce the name of your comments CGI from the links.
Posted by David at October 8, 2003 01:42 PM | EditYou might be interested in this. I will most likely release the first version tomorrow:
http://www.jayallen.org/journey/2003/10/mtblacklist_almost_ready