Linux under SpamAssassin Configuration

Source: Internet
Author: User
Tags spamassassin

SpamAssassin is a mail filter that is installed on a mail server host to identify junk letters. It uses a large number of preset rules to check spam, which checks the headers, texts, and messengers of all messages sent to the domain. The way he uses it is to use the scoring system, which means that it will be judged as SPAM according to the criteria we set, and if you use the mail server, we'll take a look at the SpamAssassin configuration method.

SpamAssassin

Installation

Yum-y Install SpamAssassin

Modify the Openwebmail profile

/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?? You can use

Vi/etc/mail/spamassassin/local.cf

# How many hits before a-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 a attachment

Report_safe 1

# Use terse version of the Spam

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 country codes won't be marked

# as being possibly spam in a foreign language.

#-Chinese 中文版

Ok_languages en en

# Mail using locales used in country codes won't be marked

# as being possibly spam in a foreign language.

Ok_locales en 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 =~/| 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 Spam1_zh/Letter Software/

Describe Spam1_zh body contain spammer msg in Chinese

Score Spam1_zh 1

Body Spam2_zh/Letter 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 Disc | 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

Score Windowopen 3.5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.