myCommentSpamBuddy tool for Frontier

Introduction 

If you're running a weblog, comment spam may be one of the biggest irritants you have to deal with. Until now Manila and its underlying discussion group software hasn't had any automatic defenses against comment spam. The goal of this release is to get a tool in the hands of Frontier system administrators that helps them, automatically, clean the spam out of their comments and dicussion groups.

Basic premise 

Spammers insert messages into your website that include links to their sites, and in doing so, improve the page rank of their sites in search engines such as MSN, Yahoo and Google. Because this is the usual motivation, they'll use the same URLs over and over, and that's what we key on, not IP addresses, which are easy to spoof, as the Movable Type comment spam defenders have proven.

It may turn out that this method is easy to work around too, but for now, it works. I've been using it on all my sites for six months, with excellent results -- for the most part my sites are free of comment spam, and where they are not, it's because I've slacked off on entering the new key phrases.

Who this is for 

To use this tool you must have:

1. Frontier running on a server, with one or more active Manila sites or discussion groups.

2. A basic knowledge of how the object databases work, because that's how you monitor the status of the tool and add new keyword strings to configure the tool.

It works on either Windows or Macintosh.

How it works 

Every hour, the tool, myCommentSpamBuddy.root, scans all the discussion groups, only looking at new posts since the last time it checked, scanning for a list of key phrases that are stored in an object database table. If a message contains any of the phrases in this table, the message is deleted.

Here are examples of some spam keys that ship with the tool. (A humorous aside, originally I had the keys in-line here, but Frontier kept deleting the story, until I got hip and put it in a text file, outside the reach of the tool. Heh.)

Before you install 

Danger Will Robinson! ;->

A picture named willRobinson.jpgThis is a serious tool. It deletes posts, in bulk. You might want to try it out in a test environment first to be sure it works. So far I can only vouch for it on one of my servers. It might have bugs (assume it does). I can't stress this enough -- make a backup now, and be careful. Read the docs fully before installing. Think. Ask questions if you have them.

Now, after you've fully appreciated the danger, here's some good news. The way you deletes posts in Frontier is by putting a boolean in the message table called flDeleted and sets it true. If you delete the boolean, as if by magic, the message comes back. So undoing damage manually isn't impossible.

How to install 

1. On your server, quit Frontier.

2. Download myCommentSpamBuddy.root into the Tools sub-folder of the Apps sub-folder of Guest Databases.

3. Launch Frontier.

What happens every hour 

At the top of the hour the scanner will run for the first time. It will create a file called myCommentSpamBuddyData.root, and it will pass over all the messages in all your sites deleting all the spam it finds. If you have a lot of large sites this will take some time, but each hour thereafter it will only look at new posts, and will run more quickly.

Look at myCommentSpamBuddySuite.background.everyHour to see exactly what it does at the top of every hour.

How to add a keyword 

1. On your server, bring Frontier to the front.

2. From the Tools menu, choose the New Key command from MyCommentSpamBuddy sub-menu.

3. Enter the key and click on OK. Be careful about entering words or phrases that could appear in non-spam messages. The safest keys are unique pieces of the URLs in the spam messages, because these are the most likely to appear in future spam. But you're making an assumption that any post that contains this key is spam. Be careful or you might get some angry users.

A picture named spamkeydialog.gif

Note: When you add a new keyword, at the next hourly scan all messages on all sites will be scanned.

How to see your keys 

1. On your server, bring Frontier to the front.

2. Choose myCommentSpamBuddyData.root from the Windows menu.

3. Double-click on the wedge next to spamKeys to expand it.

4. You can edit or delete the name of any element to change the key.

It'll be easy to update 

By design, it will be easy to update this tool.

Terms of use 

This tool is licensed under the Creative Commons sharealike with attribution license. If you redistribute it, or adapt it to another environment, you must offer it on the same terms as I do, and you must say that I wrote it.

If you adapt this concept to run in another environment, please say where you got the idea. Thanks. See this note on Scripting News for more thoughts on credit, patents, etc.

Discuss