Being the thoughts and writings of one Gustaf Erikson; father, homeowner, technologist.

This category is about this weblog

Wednesday, 2024-09-22


Dealing with comment spam

Let’s face it: it’s a war we can’t win. But in the meantime, here’s how I handle the (modest, for now) amounts of comment spam on my site.

I’ve set up wbnotify to mail me when I get a comment. When spam arrives, it’s usually consistent in the form of included URLs, i.e. the same link is posted more or less at the same time.

I got a script called blog-grep.pl from somewhere (if someone recognises this as their handiwork, please contact me so that I can attribute this correctly). This script makes it very easy to search your writeback files for the offending string, and to optionally delete them.

This solution is dependent on you having command-line access to the writebacks themselves, but I suppose it can be used “offline” if you download the files via FTP and run the script locally.

Submit a comment

Please enter comments as plain text only; HTML is not supported. Submitting an URL is optional.

Comments are moderated and may not appear immediately.

Comments are closed for this story.