Anthony McLin

Replacing Mollom with Akismet for spam filtering on a Drupal site

If you run a blog with comments enabled, you're probably painfully aware of the tedious task of dealing with all the spam issues. There's a many different approaches, and they all have tradeoffs:

  1. You could rely on a 3rd party comment system like Disqus. Tradeoff is slow performance and no SEO value from the comments.
  2. You could require users to register for your site. Tradeoff is lower comment volume as most people won't go through this effort.
  3. You could put in a moderation system. Tradeoff is maintaining the system or spending the time moderating.

I had gone with the last option, as Mollom was a great services with a Drupal plugin that let you automatically send all incoming comments to their spam filters. That dramatically reduced the time spent moderating. Unfortunetately I found out as I was recently upgrading various modules on my site that this module was no longer available:

Upon further research, I found Mollom shut its doors:

Well, I certainly wasn't going to go to manual moderation, and I don't want to turn off comments completely as I feel they are a valuable feedback mechanism for visitors to interact with a site owner. I began doing some research to see what was available for Drupal, remembering that Akismet provides spam-filtering for WordPress blogs. To my surprise, a stale Drupal plugin which hadn't been updated for 3-4 years was publishing new versions within the last year picking up where Mollom had left off. The AntiSpam module had introduced support for Akismet for filtering comments, exactly what I needed!

I installed the module, and then went to the configuration screen for some clear and easy configuration steps:

Of course I had to get an API key from Akismet, but that was quick since I already had a WordPress account tied to my Gravatar and Akismet configs for WordPress blogs that I own. Going through the configuration panel there are other nice options as well. You can manage comments indpendently of content nodes (not something I use, but nice for certain kinds of sites), as well as whitelisting based on user roles where users with "good" behavior can automatically be escalated to the whitelisted rolls. There's an automatic spam deletion option (something Mollom didn't provide). Everything in this module is nicely thought out for reducing maintenance. Another nice feature set is throttling options, so that if a botnet or an aggressive spammer hit your site, they'll get blocked with a cooldown period to reduce the amount of incoming spam:

Now that Akismet filtering was setup, I need to disable Mollom by going to the modules list at /admin/modules

Then, uninstall Mollom by going to the modules uninstall screen at /admin/modules/uninstall

Lastly to make sure I have a clean record of my site in this state, I syncronize all the files to my local development workstation, make a database backup, and commit it all to source control. This way, I can quickly restore the site from this state in the future if necessary.

That's all it takes. In under an hour, the spam filtering service is back and running with a different provider by using the AntiSpam module for Drupal.

Categories: 

Add new comment