The spam in the comments on my blog has really gotten bad lately. It seems like almost 10 to 20 comments a day are added to my site that I have to go search around for and delete. I should receive an e-mail every time a comment is added, but somehow, maybe my spam filter is catching them, I don't receive an e-mail. Which means I have to go through all of my blog entries and search them out and delete them.
My original plan was to use recaptcha, but I'd like to get the spam under control soon, and it's hard to find time to work on things like this. So anyway, here is my quick fix:
First, I'm assuming the spam is coming from bots, scripts that are specially programmed for BlogEngine.NET. So if I add any kind of required field that the bot is not expecting, I would think it would mess up the bot.
Now adding such a simple thing would be easy for the bot scripter to get around. They would simply modify their script to put a value in the new field I created; so what I'm hoping is that they won't waste their time modifying their script just for my site.
I added a checkbox that must be checked to submit a comment. I'll give this a week to see if it helps, and if so, I'll put a link in the BlogEngine.NET forums. I would suggest everyone do something a little different so that the bot scripter will have to work hard to keep up.
Update 10/07/2009
"This has worked tremendously well on cutting down on spam, but I have to say, some spam comments are still getting through and they seem to be getting sneakier. I suspect that the spammers are keeping a list of blogs that they have trouble automatically spamming and then send real people to read a little of the blog entries and manually submit comments. I say this because, not only am I still getting spam comments from time-to-time, but the comments are actually related to details, usually in the first couple of sentences, of the blog entry. Pretty sneaky. Naturally, neither this solution nor the recaptcha will work against actual humans posting comments. Perhaps the next thing I will work on is a common source for comment spammer data including the spammer's e-mail and the url they include in the comment."
Here is the technical part.
I should note, I'm using BlogEngine.NET version 1.4.5
More...