Comment spam

Nabokov never had this in mind.

Over the past week or so, many people with Movable Type blogs got hit by comment spam ostensibly posted by “Lolita,” linking to some nasty porno website. This has created a tizzy in the blogosphere, and happily, Jay Allen is doing something about it. Once he gets his plugin up and running, I plan on installing it. If only we could deal with e-mail spam as effectively.

Until he finishes, however, there’s something you can do right now. This comment spam is posted by an automated bot that looks for Movable Type’s comment cgi. You can change the name of this and cut the bot off at the knees. So here’s what you should do:

First, find the file “mt-comments.cgi” in your MT install and rename it something obscure (though I’d keep the .cgi ending).

The next steps you take are dependent on what version of MT you are running, and what version you were running when you created your blog templates, as MT has added some new tags for dealing with comments. If you have old blog templates, they will not use these tags; if you are running an old version of MT, you won’t have access to them anyhow. I’m not sure when these were instituted–I’ll leave it as an exercise to the reader to figure this out.

1. If your initial install of MT was relatively recent

This is the simplest situation: Open your mt.cfg file. Find the line that reads “# CommentScript mt-comments.cgi”. Remove the # and change “mt-comments.cgi” to whatever new name you have picked. Then rebuild all files in your blog or blogs.

2. If you are running a new install of MT with old templates

Your templates probably aren’t using MT’s special placeholder for the comments CGI. You can either change the hard-coded reference to mt-comments.cgi in each template to a hard-coded reference to the new file, or change it to “<MTCommentScript>”. In either case, once you’ve done this, go through and follow the instructions for 1 above.

3. If you are running an old version of MT

You will not be able to take advantage of the <MTCommentScript> tag at all. You will need to change the hard-coded reference to mt-comments.cgi in each template to a hard-coded reference to the new file, and then rebuild.

This sounds more complicated than it really is. It took me about 10 minutes to fix all my blogs.

1 thought on “Comment spam”

  1. I just started getting this to some of my posts. Search for “howdy guys from your cowboy fan” on google to see an example of one spam that looks like it’s hit the comments of about 3,000 blogs. Thanks for the tip on thwarting comment-spammers.

Comments are closed.