帮助处理垃圾邮件逻辑 [英] Help dealing with spam logic

查看:103
本文介绍了帮助处理垃圾邮件逻辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个博客,我决定使用Akismet和reCaptcha进行垃圾邮件过滤,我处理垃圾邮件的方式是

I have a blog, and i have decided to use Akismet and reCaptcha for spam filtering, the way i am dealing with spam is

a)用户在发表评论之前应先通过验证码b)现在,即使某些垃圾邮件绕过了验证码,我也希望Akismet处理它.

a) the user should go through the captcha before posting a comment b) Now even if some spam bypass captcha then i would like Akismet to handle it.

为使akismet处理垃圾邮件,我想到了在数据库中创建两个不同的表进行注释,一个表用于存储Akismet未检测到的注释,另一个是存储akismet(Spam)检测到的注释.这种逻辑背后的原因是我想可能是我不想将我的评论表与垃圾邮件弄混,所以只有我想到了将检测到的垃圾邮件信息存储在不同的表中.

For akismet to handle the Spam, i thought of creating two different tables in database for comments, One to store the comments which is not detected by Akismet , The other is to store the Comments that is detected by akismet(Spam). the reason behind this logic is i thought may be i don't want to mess my comments table with spam so only i thought of storing the Spam detected messages in different table.

现在的问题是,如果我使用此方法,将存在重复表.相反,我可以在表中添加一个额外的列来检查和存储垃圾邮件.我可以做任何一种方式.

Now the problem is duplication of table will exist if i use this methodology. instead i could add an extra column in the table to check and store wether it is a spam. i could do either way.

明智地采用.?

推荐答案

搜索两个表不是一种有效的方法,也不是在代码方面更容易的方法.只需合并表格并定期过滤数据即可.此外,Akismet已拥有自己的垃圾邮件数据库.维护自己的垃圾邮件副本不会增加任何价值.维持这种状态的唯一原因可能是您预见到某些情况下网络会断开连接,这是您唯一必须诉诸于自己的内部数据库查找的时间.

Searching two tables is not an efficient approach, nor is it any easier code-wise. Just combine the tables and filter the data regularly. Besides, Akismet already has its own spam database. No value is added by maintaining your own copy of spam. Probably the only reason for maintaining such is that you foresee network disconnects on certain occasions, then that's the only time you have to resort to your own internal database lookups.

这篇关于帮助处理垃圾邮件逻辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆