-
Writebacks and Akismet
2006-05-06 14:57 in /meta
There was a question recently on the blosxom mailing list about dealing with comment spam, and I asked if anyone had looked into integrating Akismet into any of the commenting plugins. There was no response, but I noticed that there is a Net::Akismet perl module already, so I decided to give it a try.
For the impatient, the result is here: writeback_akismet.
The evolution is a little interesting. I’ve realized for a while that the idea of orthogonal, independent plugins sort of falls apart for commenting. I’ve been using writebackplus and wbnotify, with slight modifications to deal with my use of date-based permalinks, and to incorporate my previous anti-spam technique (what’s my name?). One of the unsavory things about that setup was that I had to do the spam check in both modules. Now that I was going to require a network request to decide spamminess, that seemed unacceptable, so I merged the wbnotify code into the main writebacks module.
Shortly thereafter, I discovered a bug in wbnotify. Specifically, it only sends notifications for comments, but not for trackbacks. I always realized that the old technique didn’t prevent trackback spam, but I put off dealing with that because I thought I wasn’t getting any. I quickly started getting notifications of trackback spams, though, and grovelling over my writebacks directory, it turns out I’ve been getting a fair bit of it, for quite a while.
The integration of Akismet into the plugin was pretty simple. The only wrinkle was that Net::Akismet as distributed on CPAN will only install on Perl 5.8.5 or higher, although it actually works on 5.6 and above. For this reason, I actually copied the whole package into my plugin. The developer of Net::Akismet has indicated to me that he’ll fix the problem, but it hasn’t been updated yet.
On relative performance, my old technique never let through any camment spam (0% false negatives) and had an acceptably low false positive profile. All legitimate human commenters figured out how to post, if not on the first try then on the second. Of course, for trackback spam it had a 100% false negative rate: all spam got through. I have no idea if I’ve ever gotten a non-spam trackback. So far with Akismet I have seen no false positives, although my rate of legitimate comments is low enough that I can’t make a strong statement there. There’s definitely some false negatives, though. It seems like perhaps 5% of spam is getting through.
Long term, I would like to switch to using the feedback plugin for commenting. Overall, the design seems better, and I could piggyback the moderation system to send “spam” and “ham” messages back to Akimset on its mistakes. Currently, I’m trying to write some little command line utilities to do the same thing, but I haven’t gotten enough time to finish them yet.
Leave a comment
Please use plain text only. No HTML tags are allowed.