当前位置: 主页 > 操作系统 > FreeBSD > 安装FuzzyOCR来检查图片垃圾邮件

安装FuzzyOCR来检查图片垃圾邮件

时间:2009-11-25来源:图片处理网 点击:
FuzzyOCR,是一套修改自OcrPlugin的Spamassassin plugin。同样是利用光学字符辨认(OCR)的方式,来识别图像式邮件所包含的「文字讯息」,并利用Fuzzy word matching算法判断辨识出来的文字。

  主要具备了下列的功能:

  Optical Character Recognition using different engines and settings

  Fuzzy word matching algorithm applied to OCR results

  Image hashing system to learn unique properties of known spam images

  Dimension, size and integrity checking of images

  Content-Type verification for the containing email

  Matching and learning techniques

  可弹性支持不同的OCR interface,并利用fuzzy word matching算法来处理辨识的结果。

  支持DB,可将处理过的图片,以feature vectors的形态储存在数据库。因此相同或是类似的图片,便可以利用储存在DB的特征向量来处理。

  能检测不同维度、size与整合性的测试。

  邮件内容检测。

  Resource saving techniques

  仅扫描邮件,而非辨认该封信件是否为垃圾信件。信件的分类仍交由spamassassin所判别的分数高低来决定。

  对于已达到spam分数门坎的邮件,FuzzyOCR在处理该封邮件时会忽略该封信件而不进行扫描,进而减轻系统负载。(3.5版之后提供)

  藉由比对储存于DB的feature vectors(dimensions and file size)。若比对成功,则忽略该封信件,而不再进行OCR辨识与处理。

  Safety measures

  可设定扫描邮件timeout的时间,藉以避免Denial of Service的攻击。

  使用word sets取代simple lists,避免FuzzyOCR错判的可能。

  具体过程如下:

  更新ports

  # portsnap fetch update

  通过ports安装

  # cd /usr/ports/mail/p5-FuzzyOcr-devel

  # make install clean

  # cp /usr/local/share/examples/FuzzyOcr/FuzzyOcr.* /usr/local/etc/mail/spamassassin

  # vi /usr/local/etc/mail/spamassassin/init.pre

  加入如下内容:

  # FuzzyOcr

  loadplugin Mail::SpamAssassin::Plugin::FuzzyOcr

  # vi /usr/local/etc/mail/spamassassin/FuzzyOcr.cf

  确定focr_logfile设置为:

  focr_logfile /var/log/FuzzyOcr.log

  保存设置以后,重启反垃圾邮件网关引擎,例如:mailscanner

  # /usr/local/etc/rc.d/mailscanner restart

  如果没有用mailscanner,那么重启sa-spamd

  # /usr/local/etc/rc.d/sa-spamd restart

  测试是否正常工作:

  # cd /tmp

  # mkdir test;cd test

  # fetch http://users.own-hero.net/~decoder/fuzzyocr/sample-mails.tar.gz

  # unzip sample-mails.tar.gz

  # spamassassin -t < ocr-gif.eml

  或者查看日志文件:

  # tail -f /var/log/FuzzyOcr.log

  # tail -f /var/log/maillog

站长资讯网
. TAG: 垃圾邮件 FUZZYOCR 检查
推荐内容最近更新人气排行
关于我们 | 友情链接 | 网址推荐 | 常用资讯 | 网站地图 | RSS | 留言