Spam Stopper Working Great

Friday, August 12, 2005, at 08:16AM

By Eric Richardson

After letting it run overnight, I can say that the new referer spam killer is working like a charm. I've posted the code if you're interested in seeing the details. All I know is I love seeing entries like this in my log file:

200.181.52.174 - - [12/Aug/2005:12:15:34 -0700] "GET /blog/1549 HTTP/1.1" 403 9 "http://casino-games.casino-light.com/" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1)"

I have the code registered as the PerlPostReadRequestHandler for blogdowntown and blog.ericrichardson.com. That means it gets called before we've wasted much time processing the connection.

I also wrote a little log cleaner script to use SpamKiller::Handler and clean referer spam infested log files. This is helpful for old hits; new ones are 403 and don't get counted as referrals (at least in awstats).

If your problem is just comment spam that's coming in without the referers, the same technique could be used to just scan posted comments and reverse lookup the urls.