WordPress:Akismet ----Feel the Power of BlogEngine.NET Spam Filtering
来源:互联网 发布:猛龙数据 编辑:程序博客网 时间:2024/05/21 22:33
http://dbvt.com/blog/post/Feel-the-Power-of-BlogEngineNET-Spam-Filtering.aspx
I’ve been requiring visitors to create a site account to leave comments on my blog for some time now. I never liked doing it, of course, but my BlogEngine.NET 1.6 spam filtering wasn’t working correctly. I knew BlogEngine.NET’s spam-fighting capabilities were legendary, yet I was still dealing with those soul-less SEO backlink bastards whenever I dropped the site account requirement.
That’s all behind me now, because BlogEngine.NET spam filtering is now doing the job as it was designed to do in BE.NET v1.6, with the complete spam filtering process fully enabled.
To begin my story, I knew something was wrong because my spam filtering statistics were always 0. My Akismet Extension was configured correctly, my site url and apikey were up to date, and yet I was getting no Akismet or StopForumSpam love.
I’m going to walk through the moderation logic before providing the solution, so if you’re not interested in the geeky details feel free to jump to the end of this post.
The heavy lifting for BlogEngine.NET 1.6 comment moderation occurs in the BlogEngine.Core.CommentHandlers class. Comment moderation hooks into the Post.AddingComment global event with the core logic sequence (for our purposes) being
- If the User is Authenticated and if Authenticated users are auto-approved, we’re golden
- BlogEngine.NET’s White list and Black list rules come next, with the user’s email and IP checked against existing comments and handled according the blog’s configured rules.
- The comment then has to pass the blog’s additional filter settings by IP, author, website, etc. We’ll see a screenshot of that in a second.
- If the comment is still not approved at this point, the custom Akismet and StopForumSpam moderators kick in for final inspection.
Pretty thorough, isn’t it? Here’s the source logic in a nutshell.
We're going to step backward a second to display a screenshot of the additional filter settings I mentioned in step 3 to show you how complete BE.NET's spam filtering is.
The Essential Flaw
The essential flaw of the filter logic process (mine, not BlogEngine.NET’s) was in step 2, comparing the new comment properties against the existing comments and applying the White and Black list rules.
Let's look at the White list and Black list rules on the comment filtering panel in BlogEngine.NET Administration.
They're set at "0" here to show you what I did wrong. The reason they should not be set to "0" is probably obvious to most of you but it wasn't to me. Let's look at another slice of moderation code in CommentHandlers.
WhiteCnt was always equal to or greater than the BlogSetting value of "0", so all comments were being approved. The comments were never being custom filtered by IP, keyword, etc., or being sent to Akismet. D'oh!
In case it’s not absolutely clear, if you’re seeing spam in BlogEngine.NET and your custom filter stats are all “0”, the “fix” is to enter a WhiteCount value sufficient to keep the comment moving through the entire filtering process. Something like the values below should do the job for you.
Even though I wasn’t smart enough to configure it properly, I always knew that BlogEngine.NET's spam filtering was the best in the business. Now that all of my filters are firing and my custom filter stats are happily ticking away, I can start to enjoy it as God and Ruslan Tur intended.
- WordPress:Akismet ----Feel the Power of BlogEngine.NET Spam Filtering
- WordPress: Akismet in BlogEngine.NET
- WordPress:Akismet in BlogEngine.NET 2
- Ending Spam: Bayesian Content Filtering and the Art of Statistical Language Classification
- The Basics Of Image Filtering
- The power of Reading
- The power of algorithm
- The Power of Imagination
- power of the test
- BlogEngine.NET 1.1 发布
- BlogEngine.NET (一)配置
- Message rejected as spam by Content Filtering
- power of power: the real one
- The Power of Clarity (ZT)
- The Power of Prototype.js
- The Power of Work Stress
- POWER OF THE MASTER MIND
- HDU4461:The Power of Xiangqi
- 报错!Syntax error,parameterized types are only available if source level is 5.0 解决方法
- 枚举类型映射
- 人生
- Windows Server 2003 IIS 配置网站出现问题及解决
- utf-8和gb2312乱码问题,延伸至中文编码乱码问题的解决(留坑以后有时间挖)
- WordPress:Akismet ----Feel the Power of BlogEngine.NET Spam Filtering
- 集合笔记
- $.getJSON的缓存问题
- javascript实例(二)
- Android权限列表permission说明
- JPA & Hibernate 注解
- One stop shop for BlogEngine 1.3 extensions
- C# 获取局域网IP和MAC地址
- 面向程序员的数据库访问性能优化法则