Vipul’s razor, kako ga implementirati, anti-spam, deo 2
Verzije sa kojima radim, kada je ovaj post u pitanju :
OS RHEL6U2, Sendmail-8.14.4, MailScanner-4.84.5-2, MailWatch-1.2.0, SpamAssassin-3.3.1-2
Šta je uopšte Vipul i njegov brijač :-)??
E evo lepe definicije :
Vipul’s Razor is a distributed, collaborative, spam detection and filtering network. Through user contribution,
Razor establishes a distributed and constantly updating catalogue of spam in propagation that is consulted by
email clients to filter out known spam. Detection is done with statistical and randomized signatures that efficiently spot mutating spam content. User input is validated through reputation assignments based on consensus on
report and revoke assertions which in turn is used for computing confidence values associated with individual signatures.
A evo i linka odakle može da se skine.
Skidaju se fajlovi :
razor-agents-2.84.tar.bz2
razor-agents-sdk-2.07.tar.bz2
Otpakuju se :
# tar xvjf razor-agents-*
Instalacija :
#cd /nalog1/razor-agents-2.84
Kao root nalog :
# perl Makefile.PL
# make
# make test Paziti na izlaz, sve mora da javlja da je OK
# make install
Konfiguracija :
# pwd
/nalog1/razor-agents-2.84
# razor-admin -create
Pošto je pušteno kao root onda ovo kreira folder /root/.razor i tu gomilu fajlova.
Kopirati kompletan folder u /etc/MailScanner folder, sa sledećim pravima :
drwxr-xr-x 2 root root 4.0K Apr 17 11:10 .razor
I fajlovi unutar foldera :
-rw-r–r– 1 root root 706 Apr 17 11:10 razor-agent.conf
-rw-r–r– 1 root root 871 Apr 17 11:10 server.n003.cloudmark.com.conf
-rw-r–r– 1 root root 57 Apr 17 11:10 servers.catalogue.lst
-rw-r–r– 1 root root 30 Apr 17 11:10 servers.discovery.lst
-rw-r–r– 1 root root 76 Apr 17 11:10 servers.nomination.lst
U fajl /etc/MailScanner/spam.assassins.pref dodati liniju :
razor_config /etc/MailScanner/.razor/razor-agent.conf
U fajlu /etc/MailScanner/.razor/razor-agent.conf izmeniti liniju u :
logfile = /var/log/razor-agent.log Ova linija se samo izmeni
razorhome = /etc/MailScanner/.razor/ Ova linija mora da se doda
Onda uraditi sledeće (iz razor home foldera, koji je kod nas u /etc/MailScanner/.razor) :
# razor-admin -home=/etc/MailScanner/.razor -register
Register successful. Identity stored in /etc/MailScanner/.razor/identity-rutWyzKBzz
# razor-admin -home=/etc/MailScanner/.razor -create
# razor-admin -home=/etc/MailScanner/.razor -discover
Posle ovoga restartovati MailScanner :
# service MailScanner restart
Pratiti log /var/log/razor-agent.log da li sve radi kako treba.
Takođe obratiti pažnju jer razor otvara port :
Razor – out-bound TCP port 2703
Po pitanju portova videti ovaj post!
Testiranje rada :
# spamassassin -t -D razor2 < spam-mail.txt
.....
Apr 23 11:17:27.598 [29268] dbg: razor2: razor2 is available, version 2.84
Razor-Log: read_file: 16 items read from /etc/MailScanner/.razor/razor-agent.conf
Razor-Log: Found razorhome: /etc/MailScanner/.razor/
Apr 23 11:17:30.050621 check[29268]: [ 2] [bootup] Logging initiated LogDebugLevel=11 to stdout
Apr 23 11:17:30.050980 check[29268]: [ 5] computed razorhome=/etc/MailScanner/.razor/, conf=/etc/MailScanner/.razor/razor-agent.conf, ident=/etc/MailScanner/.razor//identity-rutWyzKBzz
Apr 23 11:17:30.051231 check[29268]: [ 8] Client supported_engines: 4 8
.....
Content analysis details: (16.8 points, 5.0 required)
.....