ติดตั้ง Razor สู้กับ Spam

ผมยังหาทางสู้กับ spam อยู่ครับ คราวนี้มาติดตั้ง Razor
วิธีติดตั้งอยู่ที่นี่ http://razor.sourceforge.net/docs/install.php

1. Download the latest v2 razor-agents tarball from
http://sourceforge.net/project/showfiles.php?group_id=3978

2. Download the latest v2 razor-agents-sdk tarball from
http://sourceforge.net/project/showfiles.php?group_id=3978
Untar and run:

perl Makefile.PL
make
make test
make install

If you are not root, run perl Makefile.PL with a “PREFIX=~”
option, like so:

perl Makefile.PL PREFIX=~

OR

2. Instead of installing the razor-agents-sdk package, you can install the
following Perl modules from CPAN:

Net::Ping
Net::DNS
Time::HiRes
Digest::SHA1
Getopt::Long
File::Copy
Digest::Nilsimsa
URI::Escape

If you do not install perl libs to standard places, set PERL5LIB. csh ex:

setenv PERL5LIB /home/user/myperl/lib

3. Untar the razor-agents tarball and run:

perl Makefile.PL
make
make test
make install

Note: ติดตั้งมาถึงตรงนี้แล้วมีปัญหากับ make install ครับ เกิด error ขึ้นเพราะมันหา Digest::SHA1 ไม่เจอ ทีนี้พอปล่อยไว้ปรากฎว่า default ของ SA ก็คือใช้ razor2 ซึ่งก็จะเกิด error ต่อไปนี้
razor2 check skipped: Can't locate object method "new" via package "Razor2::Client::Agent" at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Dns.pm line 430.

วิธีแก้ก็คือ ลบไฟล์ SHA1.pm, SHA1.bs และ SHA1.so ให้หมดครับ แล้วทำการติดตั้ง Digest::SHA1 ใหม่
#perl -MCPAN -e shell
#install Digest::SHA1

เสร็จแล้วก็เริ่มทำการติดตั้ง razor-agents ใหม่อีกรอบครับ 🙂

4. Razor Agents are now installed. Run `razor-client’ after installation
to insure appropriate symlinks have been created.

5. Run `razor-admin -create’ to create a default config file in your
home directory under /home/user/.razor. (Remember to change user to
your username from root before running razor-admin)

6. Razor v2 requires reporters to be registered so their reputations can
be computed over time and they can participate in the revocation
mechanism. Registration is done with razor-admin -register. It has to be
manually invoked in either of the following ways:

To register user foo with `s1kret’ as password:

razor-admin -register -user=foo -pass=s1kr3t

To register with an email address and have the password assigned:

razor-admin -register -user=foo@bar.com

To have both (random) username and password assgined:

razor-admin -register

razor-admin -register negotiates a registration with the Nomination Server
and writes the identity information in
/home/user/.razor/identity-username, or /etc/razor/identity-username
when invoked as root.

7. You can edit razor-agent.conf to change the defaults. Config options
and their values are defined in the razor-agent.conf(5) manpage.

8. The next step is to integrate razor-check, razor-report and
razor-revoke in your mail system. If you are running Razor v1, the
change will be transparent, new versions of razor agents will overwrite
the old ones. You would still need to plugin razor-revoke in your MUA,
since it’s a new addition in Razor v2. If you are not running Razor v1,
refer to manpages of razor-check(1), razor-report(1), and
razor-revoke(1) for integration instructions.

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz