欢迎登陆真网站,您的到来是我们的荣幸。 登陆 注册 忘记密码? ☆设为首页 △加入收藏
欢迎加入真幸福QQ群
电脑知识: 基础知识 网络技术 操作系统 办公软件 电脑维修 电脑安全 windows7 windows8 windows10 服务器教程 平板电脑 视频播放教程 网络应用 互联网 工具软件 浏览器教程 QQ技巧 输入法教程 影视制作 YY教程 wps教程 word教程 Excel教程 PowerPoint
云南西双版纳特产小花糯玉米真空包装


linux中postfix配置安装
2013最受欢迎的服务器管理技巧
SQL Server2000安装时提示挂起的解决方法
系统截图放在哪个文件?
无线路由器死机怎么办
VMware中FreeBSD系统采用NAT方式上网
Linux CentOS Mysql修改默认端口
如何连接虚拟机的系统
CentOS下安装配置Tomcat环境
Linux系统远程连接服务器命令行模式
linux下spamassassin配置
【 来源:网络 】【 点击:1 】 【 发布时间:2017_03_03 08:59:59 】

   SpamAssassin 是一种安装在邮件伺服主机上的邮件过滤器,用来辨识垃圾信。它是使用大量的预设规则检查垃圾信,这些规则会检查寄到网域内所有邮件的标头,内文,以及送信者。他采取的过滤方式是采用记分制,也就是说会根据我们所设定的标准来给予分数超过标准值的时候即判定为 SPAM,如果你使用了邮件服务器我们就一起来看看spamassassin配置方法。

  spamassassin

  安装

  yum -y install spamassassin

  修改Openwebmail的设定档

  /var/www/cgi-bin/openwebmail/etc/openwebmail.conf

  enable_spamcheck yes

  enable_learnspam yes

  learnspam_pipe /usr/bin/sa-learn --spam

  learnham_pipe /usr/bin/sa-learn --ham

  设定spamassassin,直接??即可使用

  vi /etc/mail/spamassassin/local.cf

  # How many hits before a message is considered spam.

  required_hits 6.5

  # Whether to change the subject of suspected spam

  rewrite_subject 1

  # Text to prepend to subject if rewrite_subject is used

  subject_tag [SPAM]

  # Encapsulate spam in an attachment

  report_safe 1

  # Use terse version of the spam report

  use_terse_report 0

  # Enable the Bayes system

  use_bayes 1

  # Enable Bayes auto-learning

  auto_learn 1

  # Enable or disable network checks

  skip_rbl_checks 0

  use_razor2 1

  use_dcc 1

  use_pyzor 1

  # Mail using languages used in these country codes will not be marked

  # as being possibly spam in a foreign language.

  # - chinese english

  ok_languages zh en

  # Mail using locales used in these country codes will not be marked

  # as being possibly spam in a foreign language.

  ok_locales zh en

  # white list

  whitelist_from www.111cn.net

  # for CJK

  score HEADER_8BITS 0

  score HTML_COMMENT_8BITS 0

  score SUBJ_FULL_OF_8BITS 0

  score UPPERCASE_25_50 0

  score UPPERCASE_50_75 0

  score UPPERCASE_75_100 0

  score BASE64_ENC_TEXT 0

  score DATE_IN_PAST_03_06 0

  score FROM_NAME_NO_SPACES 0

  score X_MSMAIL_PRIORITY_HIGH 0

  score X_PRIORITY_HIGH 0

  # customized scores

  score SUBJ_ILLEGAL_CHARS 1.0 1.0 0.8 0.8

  score HEAD_ILLEGAL_CHARS 1.0 1.0 0.8 0.8

  score FROM_ILLEGAL_CHARS 0.7 0.2 0.3 0.7

  # customized scores

  score TO_TXT 100

  score RATWARE_HASH_2 100

  score RATWARE_HASH_2_V2 100

  score RATWARE_JIXING 100

  # customized rules

  header FOXMAIL X-Mailer =~ /FoxMail /

  describe FOXMAIL Foxmail

  score FOXMAIL 3.5

  header QSUBJ Subject =~ /吗|哦|?|!/

  describe QSUBJ Header contain question? in chinese

  score QSUBJ 1

  header CDROM_ZH Subject =~ /光碟/

  describe CDROM_ZH Header contain CD in chinese

  score CDROM_ZH 1

  body UNSUBSCRIBE_ZH /取消.*订阅/

  describe UNSUBSCRIBE_ZH Body contain unsubscribe msg in chinese

  score UNSUBSCRIBE_ZH 1

  body SPAM1_ZH /发信软体/

  describe SPAM1_ZH Body contain spammer msg in chinese

  score SPAM1_ZH 1

  body SPAM2_ZH /发信系统/

  describe SPAM2_ZH Body contain spammer msg in chinese

  score SPAM2_ZH 1

  body SPAM3_ZH /打扰.*致.*歉/

  describe SPAM3_ZH Body contain spammer msg in chinese

  score SPAM3_ZH 1

  body SPAM4_ZH /行销光碟|行销名单/

  describe SPAM4_ZH Body contain spammer msg in chinese

  score SPAM4_ZH 1

  body SPAM5_ZH /风险.*利润/

  describe SPAM5_ZH Body contain spammer msg in chinese

  score SPAM5_ZH 1

  body WINDOWOPEN /window.open(/i

  describe WINDOWOPEN JavaScript: Windows.Open

  score WINDOWOPEN 3.5

本网站由川南居提供技术支持,fkzxf版权所有 浙ICP备12031891号
淳安分站 淳安分站