Mastodon
sungate.co.uk

sungate.co.uk

Ramblings about stuff

Good riddance to comment spam

I’ve been using the Akismet plugin for comment-spam control for a while now, and it seems that it is very good at identifying spammy comments. Which is good.

However, so many inconsiderate, low-life @~$&%!-ers have been spamming my site recently that on Saturday/Sunday, the virtual machine on which this site was hosted was overloaded. That’s right, killed simply due to the level of comment spam. As far as I can determine after the fact from the logs, there were approximately 1000 comment spam hits in the last day alone. This is not good.

So, I’ve changed things.

Two things:

  • I’ve changed the URL for comment submission, to stop the automatic HTTP POST operations that most of the spammers were using. This has the added benefit of ensuring that these automated submissions get an immediate 404 error, which ought to reduce load on my machine;
  • I’ve decided that comments will no longer be allowed on old posts. Therefore, I’ve put in a script which disallows comments to posts older than one month.

This appears so far to have been effective. Number of comment spams since I introduced the above 24 hours ago? Zero. Number of (failed) attempts to spam the old comment URL? Just over 300.

The machine feels much quicker and more responsive now too, which is as it should be. Gits.

5 Responses to Good riddance to comment spam

  1. I tried changing the URL on my site a while ago and they simply started requesting the entry before posting the comment and extracting the URL from it…
    I’m using a text-based captcha and it stops 99% of comment spam, but trackback spam is another thing entirely…

    I did get 1000 comment spams the other day though, obviously after somebody had manually solved the captcha. Probably the same guy that got you.

    Permalink
  2. I say make it illegal to buy from the spammers. Never mind going after the dealers got for the addicts!

    Permalink
  3. Man – that sucks.

    I get a reasonable amount of spam, but it’s all captured in the moderation queue. But never that much 🙁

    Permalink
  4. Are the spams all from one (or few) IP address? In which case, you might look at rate-limiting in Apache (or at the iptables level) to reduce spam.

    Permalink
  5. DJ: The spam is stopped in the sense that it doesn’t make it through the filters, the real problem was that the level of it was so high that it was causing a load on Apache/MySQL – my solution here at least means that it won’t hit the DB.

    PerfDave: The 1000 or so comment spams for the period that I looked at were from more than 900 different IPs; there were *some* common IPs, but not many.

    Permalink

Comments are closed.