db(); $openidname = $_SESSION["sess_openid_auth_code"]; ?>

« November 2004 | Main | January 2005 »

December 2004 Archives

Saturday, 18 December 2004

Comment spam killing MT weblogs?

Slashdot has an article on how comment spammers are killing Movable Type blogs by introducing high load on servers. The report turns out to be talking about a bug in MT 3.x, whereby the server gets put under high load even if the comment is rejected by MT 3.x's anti-spam measures.

What about MT 2.x users, though? Movable Type deliberately left MT 2.x users in the cold in this regard as gentle encouragement to upgrade to MT 3.x. For me and many others, this is more hassle than it's worth, although we definitely don't want to have to continue to fend off the torrential spam that is coming through these days. These fuckers will do anything to get their links crawled in an effort to increase their PageRank.

Below, you'll find a simple patch to MT 2.661, the last of the 2.6 releases. Once this is applied and someone tries to post a comment, MT will read a couple of files, bad_words and bad_urls, and reject the comment if either the author name contains any of the bad words or the comment field contains any of the bad URLs. In fact, it doesn't just reject the comment; it also auto-bans the IP address of the prospective poster.

The bad_words and bad_urls files can actually contain regular expressions, one per line. These files should be installed in the same location as Comment.pm. In the code below, the path is hard-coded as /var/www/cgi-bin/lib/MT/App.

It takes a very short while to build up the bad_words and bad_urls files. If you're hit with spam anything like as often as I am, you'll find this patch starts to save you a lot of arduous work very quickly.

By posting this here, I run the risk that spammers read the code and work around my current measures, but I think the benefit of posting the code outweighs the inconvenience of potentially tipping off the spammers.

One tip: when composing your bad_words file, include &#\d+; as one of your regular expressions, as this will stop spammers from using HTML entities to get around your traps for individual words.

Continue reading "Comment spam killing MT weblogs?" »

Monday, 20 December 2004

The Garden Island

Sarah and I made our fourth trip to Hawai'i in November to spend a long Thanksgiving on Kaua'i, the so-called garden island. We had a very relaxing time, ambling around, snorkelling and viewing the island from the air.

I was surprised how little urbanisation there was on the island. It was very green, with only a couple of sleepy little towns encroaching on mother nature. As with all of the other Hawaiian islands, a trip to Kaua'i is more than recommended.

Photos of the trip are now on-line.

About December 2004

This page contains all entries posted to Caliban - Opinion and Righteous Anger in December 2004. They are listed from oldest to newest.

November 2004 is the previous archive.

January 2005 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34