SpamAssassinのインストール手順

  1. 事前準備 RPMForgeリポジトリをインストールしておく

  2. perlモジュールインストール

# yum -y install perl-Net-DNS perl-HTML-Parser
# yum -y --enablerepo=rpmforge install perl-Encode-Detect
# yum -y --enablerepo=rpmforge install perl-Mail-SPF perl-Mail-SPF-Query perl-IP-Country perl-Net-Ident perl-Mail-DomainKeys perl-Mail-DKIM
  1. glibcモジュールインストール

+i386+

yum -y install glibc.i386

+x86_64+

yum -y install glibc.x86_64
  1. SA用 mecab インストール
# rpm -Uvh http://www.ring.gr.jp/pub/linux/Vine/VineSeed/SRPMS.plus/mecab-0.97-2vl5.src.rpm
# rpm -Uvh http://www.emaillab.org/spamassassin/SRPMS/mecab-ipadic-2.7.0.20070801-1.sa.src.rpm
# cd /usr/src/redhat/SPECS

+/usr/src/redhat/SPECS/mecab.spec+

%configure --disable-static --with-charset=utf8

+i386+

# rpmbuild -ba mecab.spec
# rpm -ivh /usr/src/redhat/RPMS/i386/mecab-0.97-2.i386.rpm 
# rpm -ivh /usr/src/redhat/RPMS/i386/mecab-devel-0.97-2.i386.rpm 
# rpmbuild -ba mecab-ipadic.spec
# rpm -ivh /usr/src/redhat/RPMS/i386/mecab-ipadic-2.7.0.20070801-1.sa.i386.rpm

+x86_64+

# rpmbuild -ba mecab.spec
# rpm -ivh /usr/src/redhat/RPMS/x86_64/mecab-0.97-2.x86_64.rpm 
# rpm -ivh /usr/src/redhat/RPMS/x86_64/mecab-devel-0.97-2.x86_64.rpm 
# rpmbuild -ba mecab-ipadic.spec
# rpm -ivh /usr/src/redhat/RPMS/x86_64/mecab-ipadic-2.7.0.20070801-1.sa.x86_64.rpm
  1. perl-Text-Mecabインストール
# rpm -Uvh http://www.emaillab.org/spamassassin/SRPMS/perl-Text-MeCab-0.17-1.src.rpm
# cd /usr/src/redhat/SPECS
# rpmbuild -ba perl-Text-MeCab.spec

+i386+

# rpm -ivh /usr/src/redhat/RPMS/i386/perl-Text-MeCab-0.17-1.i386.rpm

+x86_64+

# rpm -ivh /usr/src/redhat/RPMS/x86_64/perl-Text-MeCab-0.17-1.x86_64.rpm

razor2インストール

http://razor.sourceforge.net/ にアクセスしてパッケージを取得します。

# wget http://downloads.sourceforge.net/project/razor/razor-agents-sdk/2.07/razor-agents-sdk-2.07.tar.bz2?use_mirror=jaist
# wget http://downloads.sourceforge.net/project/razor/razor-agents/2.84/razor-agents-2.84.tar.bz2?use_mirror=jaist
# tar xvjf razor-agents-sdk-2.07.tar.bz2 
# tar xvjf razor-agents-2.84.tar.bz2
# cd razor-agents-2.84
# perl Makefile.PL 
# make
# make test
# checkinstall -R make install

+i386+

# rpm -ivh /usr/src/redhat/RPMS/i386/razor-agents-2.84-1.i386.rpm

+x86_64+

# rpm -ivh --nomd5 /usr/src/redhat/RPMS/x86_64/razor-agents-2.84-1.x86_64.rpm
# /usr/bin/razor-admin -d -create -home=/etc/mail/spamassassin/.razor 
# /usr/bin/razor-admin -d -register -home=/etc/mail/spamassassin/.razor

+/etc/mail/spamassassin/.razor/razor-agent.conf+

debuglevel             = 1
razorhome              = /etc/mail/spamassassin/.razor
# chown mail:mail -R /etc/mail/spamassassin/.razor

+/etc/logrotate.d/razor+

/etc/mail/spamassassin/.razor/razor-agent.log {
    weekly
    rotate 4
    missingok
    create 0644 mail mail
}

日本語版 spamassassin インストール

# rpm -Uvh http://spamassassin.jp/download/sa3.2/packages/rhel/spamassassin-3.2.5-1.jsaug.src.rpm
# cd /usr/src/redhat/SPECS
# rpmbuild -ba spamassassin.spec

+i386+

# rpm -ivh /usr/src/redhat/RPMS/i386/spamassassin-3.2.5-1.jsaug.i386.rpm

+x86_64+

# rpm -ivh /usr/src/redhat/RPMS/x86_64/spamassassin-3.2.5-1.jsaug.x86_64.rpm

+/etc/mail/spamassassin/tokenizer.pre+

# Tokenizer::SimpleJA
#
#loadplugin Mail::SpamAssassin::Plugin::Tokenizer::SimpleJA

# Tokenizer::MeCab
#
loadplugin Mail::SpamAssassin::Plugin::Tokenizer::MeCab

+/etc/mail/spamassassin/local.cf+

normalize_charset 1
use_auto_whitelist 0

clear_report_template
report "_TESTSSCORES(, )_"