暮光博客

小心你讨厌的东西,因为你很可能被它塑造成某种形状

滚蛋吧垃圾评论

折腾 22 条评论

暮光博客此前一直在使用的是 Akismet 这款高效的 SPAM 拦截插件,这也就是博客为什么发布评论速度会慢一点的原因,因为系统需要将读者的评论先发送到 Akismet 的国外服务器上做校验。

每天到我博客发布垃圾评论的 SPAM 机器人特别多(见图1),但是大部分都会被 Akismet 成功拦截。有时候我会在垃圾箱里翻到几条「看似正常」的评论,但点进其个人主页,基本都是推广营销类的网站,被拦截也就不奇怪了。

WX20180815-112735.png

(图1)

但每天总会有那么几条漏网之鱼,是很明显的 SPAM,不知道为何 Akismet 没有检测出来。由于博客设置了评论邮件提醒,垃圾评论同时变成了垃圾邮件(见图2),对我产生了不少困扰。

WX20180815-113012.png

(图2)

今天实在受不了,写个小插件额外拦截了一下 Akismet 的漏网之鱼,提取了三个特征:

  • IP归属地非中国
  • 评论作者名称不包含中文
  • 评论内容不包含中文

当评论同时满足上述条件时,返回错误信息(见图3)。

WX20180815-112836.png

(图3)

这样,与 Akismet 相辅相成,应该就能拦截掉 99% 的 SPAM 了。但存在误杀的可能性,我在返回的错误信息中已经做了提示,相信有心评论的读者也能够斟酌修改。

Redis Sentinel 机制与用法
评论区
选择表情选择表情
  1. unethost無限空間虛擬主機 技術分享部落格

    http://blog.unethost.com/

    回复
  2. Household members should stay in another room or be separated from the patient as much as possible. Household members should use a separate bedroom and bathroom, if available.
    Prohibit visitors who do not have an essential need to be in the home.
    Household members should care for any pets in the home. Do not handle pets or other animals while sick. For more information, see COVID-19 and Animals.
    Make sure that shared spaces in the home have good air flow, such as by an air conditioner or an opened window, weather permitting.
    Perform hand hygiene frequently. Wash your hands often with soap and water for at least 20 seconds or use an alcohol-based hand sanitizer that contains 60 to 95% alcohol, covering all surfaces of your hands and rubbing them together until they feel dry. Soap and water should be used preferentially if hands are visibly dirty.
    Avoid touching your eyes, nose, and mouth with unwashed hands.
    The patient should wear a facemask when you are around other people. If the patient is not able to wear a facemask (for example, because it causes trouble breathing), you, as the caregiver, should wear a mask when you are in the same room as the patient.
    Wear a disposable facemask and gloves when you touch or have contact with the patient’s blood, stool, or body fluids, such as saliva, sputum, nasal mucus, vomit, urine.
    Throw out disposable facemasks and gloves after using them. Do not reuse.
    When removing personal protective equipment, first remove and dispose of gloves. Then, immediately clean your hands with soap and water or alcohol-based hand sanitizer. Next, remove and dispose of facemask, and immediately clean your hands again with soap and water or alcohol-based hand sanitizer.
    Avoid sharing household items with the patient. You should not share dishes, drinking glasses, cups, eating utensils, towels, bedding, or other items. After the patient uses these items, you should wash them thoroughly (see below “Wash laundry thoroughly”).
    Clean all “high-touch” surfaces, such as counters, tabletops, doorknobs, bathroom fixtures, toilets, phones, keyboards, tablets, and bedside tables, every day. Also, clean any surfaces that may have blood, stool, or body fluids on them.
    Use a household cleaning spray or wipe, according to the label instructions. Labels contain instructions for safe and effective use of the cleaning product including precautions you should take when applying the product, such as wearing gloves and making sure you have good ventilation during use of the product.
    Wash laundry thoroughly.
    Immediately remove and wash clothes or bedding that have blood, stool, or body fluids on them.
    Wear disposable gloves while handling soiled items and keep soiled items away from your body. Clean your hands (with soap and water or an alcohol-based hand sanitizer) immediately after removing your gloves.
    Read and follow directions on labels of laundry or clothing items and detergent. In general, using a normal laundry detergent according to washing machine instructions and dry thoroughly using the warmest temperatures recommended on the clothing label.
    Place all used disposable gloves, facemasks, and other contaminated items in a lined container before disposing of them with other household waste. Clean your hands (with soap and water or an alcohol-based hand sanitizer) immediately after handling these items. Soap and water should be used preferentially if hands are visibly dirty.
    Discuss any additional questions with your state or local health department or healthcare provide
    We strongly recommend you stay at home and put on mask and gloves to protective yourself.
    If you can't buy them at your local, you may try to order it online, such as: [url=https://www.antsppe.com]ANTS-LINK[/url], i ordered some from them, it's good
    good luck!

    回复
  3. Hi folks, just came across your post, really like your works!
    Would like to post some useful website, hope you like it.
    [url=https://flvto.ch/]Youtube Converter[/url]
    [url=https://y2mate.ch/]y2mate[/url]
    [url=https://keepvid.ch/en/youtube-video-downloader]Youtube video downloader[/url]
    [url=https://ytmp3.ch/]Youtube to mp3 downloader[/url]
    [url=https://listentoyoutube.ch/ja/youtube-to-mp3-sites]YouTube MP3 変換[/url]
    [url=https://youtufab.com/download-youtube-mp4-1080p]Youtube to mp4[/url]

    回复
  4. 第一借錢網擁有全台最多的借錢資訊

    https://168cash.com.tw/

    回复
  5. 建议博主开启回答计算题才能回复,网上有现成的代码 icon_redface.gif

    回复
    1. @ahxx

      曾经考虑过,但是博客开启了页面缓存,计算题会被缓存掉导致失效,而且计算题一定程度上会造成留言者的不方便。

      回复
  6. 哈哈,多好,我的BLOG都没人评论

    回复
  7. 国外ip解析到127.0.0.1,算不算很绝

    回复
  8. 优秀。不过我这边Akismet就够用了。再说你写的插件呢

    回复
  9. 秀啊 icon_razz.gif

    回复
  10. 我是用滑块

    回复
  11. 发表评论前,请滑动滚动条解锁。。。 icon_idea.gif

    回复
  12. Akismet 一直用,感觉挺好用的。从建博开始就一直用!

    回复
  13. Jim

    I like this post

    回复
  14. 垃圾评论是比较痛苦,严重怀疑这些人做的价值,为了SEO堆外链~?

    回复
    1. @拾风

      大部分都是为了堆外链,小部分是为了吸引一点可怜的流量。

      回复
  15. 我的还好,暂时没有被这些垃圾评论盯上..

    回复
    1. @旧日的足迹

      那真是幸运。

      回复