SpamAssassin is a mail filter installed on the mail servo host to identify spam messages. It uses a large number of Preset rules to check spam. These rules will check the headers, inarticles, and senders of all emails sent to the domain. His filtering method adopts the notation, that is to say, when the score is given to exceed the standard value according to our settings, it is determined as SPAM, if you use the email server, let's take a look at the spamassassin configuration method.
Spamassassin
Install
Yum-y install spamassassin
Modify Openwebmail settings
/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
Set spamassassin, direct ?? Ready for use
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 administration ages used in these country codes will not be marked
# As being possibly spam in a foreign language.
#-Chinese english
OK _ages 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. bKjia. c0m
# 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
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 = ~ /? | Oh |? |! /
Describe QSUBJ Header contain question? In chinese
Score QSUBJ 1
Header CDROM_ZH Subject = ~ /CD/
Describe CDROM_ZH Header contain CD in chinese
Score CDROM_ZH 1
Body UNSUBSCRIBE_ZH/cancel. * subscribe/
Describe UNSUBSCRIBE_ZH Body contain unsubscribe msg in chinese
Score UNSUBSCRIBE_ZH 1
Body spamdomainzh/mail software/
Describe SPAM1_ZH Body contain spammer msg in chinese
Score SPAM1_ZH 1
Body SPAM2_ZH/mail system/
Describe SPAM2_ZH Body contain spammer msg in chinese
Score SPAM2_ZH 1
Body SPAM3_ZH/disturb. * To. * Sorry/
Describe SPAM3_ZH Body contain spammer msg in chinese
Score SPAM3_ZH 1
Body SPAM4_ZH/marketing CD | marketing list/
Describe SPAM4_ZH Body contain spammer msg in chinese
Score SPAM4_ZH 1
Body SPAM5_ZH/risk. * profit/
Describe SPAM5_ZH Body contain spammer msg in chinese
Score SPAM5_ZH 1
Body WINDOWOPEN/window. open (/I
Describe WINDOWOPEN JavaScript: Windows. Open
Scoring WINDOWOPEN 3.5