December 14, 2004
Movable Type Comment Spam
For those of you blogging with Moveable Type and suffering under a deluge of comment spam, the best way to fix it is to change the name of your Post button and make one little tweak in one of the .cgi files. I did this months ago and the comment spam that's appeared has nearly vanished. Checking the referral logs this morning shows that there were 13 attempts at adding comment spam to various open news bits. None of these attempts were successful.

Instructions in detail can be found at this post at Elly's A Reporter's Life.

Instructions in brief: in each of the three comment templates, change the name of the post button to something else (blarg). In MT/App/comments.pm, change the line (around line 25, methinks) if ($q->param('post')) { to if ($q->param('blarg')) {. This is the line just before $q->param('__mode', 'post');

update: while this seemed to stem the tide, over the past four days, I've had two separate instances of spamming getting through. Next programming feat: removing the e-mail and URL fields so that if MT detects anyone submitting either of those fields, it'll add the ip address to the blocked IP list. I'll probably work that up after the holidays. Just so I don't have, oh, a dozen things to delete when I get back, I'll close off comments before I leave.

Posted at December 14, 2004 08:51 AM



Note: This only works if you can find the comments.pm file and/or the App folder.

Posted by: Layla at December 14, 2004 08:36 PM


They're probably in the cgi-bin folder, wherever that is in your site.

Posted by: cartoonlad at December 14, 2004 10:09 PM


Blah blah blah blah video porker! Free ijPod! We've got spam and eggs and rats and spam, there's not much rat in it.

Posted by: President Leechman at December 16, 2004 04:58 AM