linux下spamassassin配置

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

(0)

相关推荐

  • 在Red Hat Linux下安装配置Samba

    Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成.通过Samba也可以快速实现Linux与Windows传输文件.下面由小编为大家演示在Red Hat L ...

  • Linux下apache配置https方法教程

    Linux下apache怎么配置https访问,Linux下apache配置https方法教程,apache配置https方法步骤介绍. 操作方法 01 1.安装Openssl 要使Apache支持S ...

  • [Linux技术]Linux 下svn配置

    操作方法 01 svn配置 1.安装svn服务器端 yum install subversion      从镜像下载安装svn服务器端 cd /usr/local/              //进 ...

  • Linux 下安装配置go语言环境

    linux下安装go 操作方法 01 下载最新版本的Go语言二进制档案包,下载地址http://golang.org/dl/(官网) 或http://golangtc.com/download,注意选 ...

  • linux下hadoop配置过程

    linux下hadoop配置过程

  • Linux 下如何配置 PHP 支援 GD

    GD 安? 第一部需要做的是先要安? GD 到系??龋??惭b GD 前需要安? jpeg-6b, libpng, zlib, freetype。以下是下??址: GD 2.0.33 jpeg-6b ...

  • Ubuntu(Linux)下如何配置IP地址

    一.使用命令设置ubuntu的ip地址 1.修改配置文件blacklist.conf禁用IPV6: sudo vi /etc/modprobe.d/blacklist.conf 2.在文档最后添加 b ...

  • Linux下安装配置VSFTP服务器

    Linux下安装配置VSFTP服务器

  • linux下如何配置IP地址

    linux操作系统已经是服务器的首选,安装好linux系统后第一步便是配置IP地址,使服务器与互联网连接,以实现web等服务. 操作方法 01 首先登陆已经安装好的linux操作系统 02 在linu ...