การติดตั้ง SpamAssassin ใน DirectAdmin
CP: DirectAdmin
ก่อนอื่นเรามาติดตั้ง SpamAssassin ก่อนคะ
#cd /usr/local/directadmin/scripts #./spam.sh
จากนั้นสิ้นสุดการติดตั้งค่ะ
ทีนี้ให้เราไปแก้ใขไฟล์ exim.conf นะคะ
vi /etc/exim.conf
[code]# Spam Assassin
#spamcheck_director:
#
REQUIRED module missing: Archive::Tar
REQUIRED module missing: IO::Zlib
optional module missing: Digest::SHA
optional module missing: Mail::SPF
optional module missing: IP::Country
optional module missing: Razor2
optional module missing: Net::Ident
optional module missing: IO::Socket::INET6
optional module missing: Compress::Zlib
optional module missing: Mail:
KIMoptional module missing: LWP::UserAgent
optional module missing: HTTP:
ateoptional module missing: Encode:
etectวิธีแก้ไข ให้ติดตั้ง perl module ที่ขาดไปตามนี้ครับ
#perl -MCPAN -e shell
> install Bundle::LWP Archive::Tar
ส่วน optional นี้จะลงด้วยหรือไม่ก็ได้
> install Digest::SHA Mail::SPF IP::Country Razor2 Net::Ident IO::Socket::INET6 Compress::Zlib Mail:
KIM LWP::UserAgent HTTP:
ate Encode:
etectถ้ามีขึ้น yes/no ให้กด enter ผ่านไปเลยครับ
เสร็จแล้วเรียก spam.sh อีกรอบหนึ่ง
| ||
| To enable Spamassassin on your server, you need to first need to install it. Once installed a few minor changes are needed in your /etc/exim.conf file. 1) Install spamd and spamc: cd /usr/local/directadmin/scripts export PERL_EXTUTILS_AUTOINSTALL="--defaultdeps" If it asks you: Are you ready for manual configuration? [yes] no be sure to type "no" and press enter. Only use "yes" if you really know what you're doing. The default options are going to be the most reliable.If after cpan has been used and the setup is complete (download servers/options, etc), you may need to use this as well if you don't wish to sit around and answer "y" to all of the "prepend to list" questions: export PERL_MM_USE_DEFAULT=1 However, if you have never run cpan before, so do not set the PERL_MM_USE_DEFAULT=1 option, or else it will get you stuck in a loop for some of the config options.Also Related (/etc/perl/CPAN/Config.pm): [server]# cpan Or, as an alternative to using cpan, CentOS boxes can use this: yum -y install perl-ExtUtils-MakeMaker perl-Digest-SHA perl-Net-DNS perl-NetAddr-IP perl-Archive-Tar perl-IO-Zlib perl-Digest-SHA perl-Mail-SPF perl-IP-Country perl-Razor2 perl-Net-Ident perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-Mail-DKIM perl-DBI perl-Encode-Detect 2) Start the spamd: /usr/bin/spamd -d -c -m 15 3) In order to get exim to use the spamd program, you'll need to make some changes in your /etc/exim.conf. Change: # Spam Assassin # Spam Assassin 4) Restart exim: Redhat: /sbin/service exim restart FreeBSD: /usr/local/etc/rc.d/exim restart The global spamassassin config file is in /etc/mail/spamassassin/local.cf If you run debian and are missing perl or some pm files, type: apt-get install perl-base perl-modules |