4,541,244 th visitor since 2017.2.1 ( Today : 20215 )
Computer ???
No. 381
Name. swindler
Subject. spamassassin 스팸필터 설치
Main Cate. Linux
Sub Cate.
Date. 2009-06-25 12:26
Hit. 4179 (211.36.27.8)
File.
spamassassin 필터 설치하기

spamassassin 은 open-source spam filter 로서 간단히 적용이 가능하다.
만약 Redhat Linux 9 이하등의 하위 버전을 이용중이라면 spamassassin 이 제공하는 Full Feather 를 사용할 수 없다.

1. spamassassin 설치
CentOS 나 Fedora 등이 설치된 서버라면 간단히 yum -y install spamassassin 과 같이 설치가 종료되나,
여기서는 배포사이트인 http://spamassassin.apache.org 에서 제공되는 tar.bz2 를 이용하여 설치한다.
적당한 경로에 해당 패키지를 다운로드를 한다.
[root@localhost root]# rpmbuild -tb 다운로드받은Mail-SpamAssassin.tar.gz

rebuild 된 rpm 패키지를 설치한다.
[root@localhost root]# rpm -Uhv /usr/src/redhat/i386/Mail-Spam*

spamassassain 패키지가 요구하는 Perl module 을 아래와 같이 추가한다.
예) Net::DNS

[root@localhost root]# perl -MCPAN -e shell
> install Net::DNS
와 같이 요구되는 모든 Perl module 을 설치 후 다시 아래와 같이 패키지를 설치한다.
[root@localhost root]# rpm -Uhv /usr/src/redhat/i386/Mail-Spam*

2. mailbox 로 전송되기 전에 spamassassin 이 처리하도록 설정.
[root@localhost root]# vi /etc/procmailrc
최상단에 아래와 같이 추가
INCLUDERC=/etc/mail/spamassassin/spamassassin-default.rc

3. spamassassin 구동
[root@localhost root]# /etc/init.d/spamassassin start

4. spamassassin 설정 파일들은 /etc/mail/spamassassin 에 위치하고 있으며, SpamAssassin Configuration Generator 를 이용한다.
http://www.yrex.com/spam/spamconfig.php 을 참고해서 적절히 활성화 시킨 후에 Genetate the Configuration File 을 수행하여 생성된 Configuration 을 /etc/mail/spamassassin/local.cf 파일로 대체시킨다.

5. spamassassin 을 재구동하면 모든 구성이 완료된다.
[root@localhost root]# /etc/init.d/spamassassin restart



그리고 아래와 같이 local.cf 에 각 항목에 대한 스코어를 지정할수 있다.

# there are many non-English users
# ordered by alphanumeric
score FROM_ILLEGAL_CHARS 0
score HEAD_ILLEGAL_CHARS 0
score SUBJ_ILLEGAL_CHARS 0
score CHARSET_FARAWAY_HEADER 0
score CHARSET_FARAWAY 0
score HTML_CHARSET_FARAWAY 0
score MIME_CHARSET_FARAWAY 0

#etc
score SUBJECT_NEEDS_ENCODING 0
score MIME_HTML_ONLY 0
score FROM_EXCESS_BASE64 0
score MIME_BASE64_TEXT 0
score FROM_LOCAL_NOVOWEL 0

[바로가기 링크] : http://coolx.net/cboard/computer/381



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog