Avoid Spam Comments

04/04/2005

There are several techniques for avoiding spam completely or at least making life difficult for spammers. One possible solution is based on the MT Approval Plugin.

MT Approval Plugin

This weblog uses the MT Approval Plugin. Its aim is to block comments created by software.

After the plugin has been installed, a comment has to be opened in preview mode. Only after the preview has been on screen, the comment may be saved in the database. By forcing a preview, a so-called hash value is included in the comment form. This value must exist in the form being posted to the server, or otherwise the comment will be rejected.

What is a hash?

Simply said a hash can be explained as follows.

There are a couple of input fields (name, email, URL and comment) on the comment form. The content of these fields can be used for creating a short string. This mapping is done by a secret algorithm. As a simplified example, just imagine that the fourth letter of each text field is extracted and concatenated into a string.

A comment will only be stored in the database if the four input fields and the hash value fit. As an unwanted spammer does not know how the hash value has been calculated, he cannot write a program for building a comment.

Installation

The MT Approval Plugin consists of several files. These have to be distributed as follows.

<MT>/mt-approval.cgi
<MT>/extlib/jayseae/approval.pm
<MT>/plugins/Approval.pl
<MT>/tmpl/cms/approval.tmpl
<MT>/tmpl/cms/view_log.tmpl

Next, you have to change the Movable Type templates. The details depend on the state of your Movable Type installation. These should best be read in the original installation description.

  • The comment form contains some textboxes and »Submit« pushbutton. The pushbutton has to be removed. Only the preview form may contain this pushbutton.
  • The hash value will be computed by the plugin. Merging this function into your Movable Type installation is very easy, if the »MTCommentFields« tag is used. The only thing you have to do in this case, is entering an additional attribute.

After you correctly installed the plugin, a comment will only be saved if it has been viewed in the preview form.

You might also want to read Weblog Spamming Basics, where basic information about weblog spamming is given.

mgs | 04/04/2005

Feedback is welcome!

What do you think about this entry? Was it interesting or boring? I would like to hear your comments. If the text was helpful, please consider setting a link to http://www.movable-type-weblog.com/.

No spam please!

For protecting this weblog I have installed the MT-Approval Plugin. You have to view a new comment in preview mode, before it is saved on the server. Moreover, I will view your comment manually, before it is published. You can find more information on the subject in the entry Weblog Spamming Basics.

With an active TypeKey session, your comment will be published immediately.

Post a new comment

TypeKey has temporarily been disabled at this location. Please create your comment without using TypeKey or log in from the preview dialog.




Remember Me?