So, anecdotally, it looks like Google's anti-blog-spam campaign may be working. A handful of easy changes to my home blog seems to have helped tremendously:
#!/usr/bin/perl -wT print "Content-type: text/plain\n\n"; 1
sub squash_spammers { my $agent = $ENV{'HTTP_USER_AGENT'} ||= ""; my $referer = $ENV{'HTTP_REFERER'} ||= ""; if ( ( $agent =~ m/NET CLR 1.1.4322/ ) || ( $referer =~ m@\.info/$@ ) ) { # print "Content-type: text/plain\n\nsorry\n"; die "Sorry, this is a spam-free zone. $!"; } return; }This is now called in the eval block that does the rest of the work for the comment script, so attempts to spam me automatically fail. If I need to add more criteria, I can hook them in as needed, but these two rules seem to have caught everything so far.
Since making these changes, things have gotten much better. I've had no comment spam this week (usually, a handful makes it past the comment spam plugin), and more strikingly, the amount of referer traffic -- requests for random URLs with referer fields like "http://buy-
We'll see how well it's working a month from now though ...
Re:BlogSpamAssassin
babbage on 2005-01-24T03:09:04
Ooooh, excellent idea.
Thanks, I'll give it a try!