Updated 1/18/05 4PM
I am not a Expert HOW-TO maker, But this did work for me.. Please read entire post Before Attempting
The install is just like SpamAssassin 2.64 and I will use the HOW-TO from Jafo (Thanks Jafo!!)
http://forum.ev1servers.net/showthread.php...&threadid=42806
I will modify it to suite our needs for SA-3.0.2
----------------------------------------------------------------------
Here we go
Login as root
# su -
# LANG=C
# cd /usr/src
# wget http://apache.cs.utah.edu/spamassassin/Mai...in-3.0.2.tar.gz
# tar zxvf Mail-SpamAssassin-3.0.2.tar.gz <-----this ,of course, is what ever the "current" download name would be.
# cd Mail-SpamAssassin-3.0.2 <-----this ,of course, is what ever the "current" download name would be.
--------------------------------------
Then add/update the Net::DNS adn other needed modules perl module (especially for those using Whitebox linux/Fedora)
It doesnt hurt to do it on ALL linux flavors
perl -MCPAN -e shell
CPAN> install Net::DNS
install Time::HiRes
install DBI
install IO::Socket::SSL
install Net::Ident
install IP::Country::Fast
install Mail::SPF::Query
install Net::SMTP
install DB_File
install MIME::Base64
install MIME::QuotedPrint
exit or quit CPAN
now for the ACTUAL install
# perl Makefile.PL INSTALLDIRS=vendor
It will as a few questions..
enter in your email address you want to use, I used postmaster@mydomain.com
and enter "n" for all the rest of the questions
# make
# make test
# make install
# make distclean
make sure this next line is COMPLETE by using ONE line and all the text between the #'s or this will fail to work, starting with "perl" and ending with "vendor"
# perl Makefile.PL PREFIX=/home/virtual/FILESYSTEMTEMPLATE/spam_filter/usr SYSCONFDIR=/home/virtual/FILESYSTEMTEMPLATE/spam_filter/etc INSTALLDIRS=vendor
# make
# make test
# make install
--------------------------------------
Then we need to turn off the Auto_whitelist variable or ensim's setup will crash spamd!
pico /etc/sysconfig/spamassassin
it will say:
# Options to spamd
SPAMDOPTIONS="-d -c -a -m 5 "
Remove the "-a" from the SPAMDOPTIONS
Like so:
# Options to spamd
SPAMDOPTIONS="-d -c -m 5 "
then save it
and edit both files:
pico /etc/mail/spamassassin/local.cf
pico /home/virtual/FILESYSTEMTEMPLATE/spam_filter/etc/mail/spamassassin/local.cf
change:
rewrite_subject 1
subject_tag [SPAM]
to say:
rewrite_header Subject [SPAM]
add this line at the end:
use_auto_whitelist 1
then save it
then:
mkdir /var/www/.spamassassin
chown apache:apache -R /var/www/.spamassassin
then follow ffeingo's How-To at (thanks ffeingol)
http://www.cpguru.com/content/view/39/37/
then import all the old Bayes DB from your old stuff (makes it easier for it to take the old Learing DB and implement it in the new DB)
service spamassassin stop
sa-learn --import -D
sa-learn --sync -D
--------------------------------------
Then we need to upgrade all the domains to include the latest spamd, this will reset the Spam filter flags
I had some erroneous errors but it was safe to ignore them (i.e. I had some sites with spam checking turned off, this will turn them back on)
# mkdir /root/stuff
# cd /root/stuff
# pico -w upgrade-spamass
Then paste the following into the editor:
#!/bin/sh
cd /home/virtual
for site in site*; do
echo "upgrading $site ..."
/usr/local/bin/EditVirtDomain -c spam_filter,enabled=0 $site
/usr/local/bin/EditVirtDomain -c spam_filter,enabled=1 $site
done
Then hit CTRL-X to save the file.
# chmod u+x upgrade-spamass
# ./upgrade-spamass
as stated by Jafo:
Now sit back and watch. You will see it disable/enable spamassassin for each Ensim account, upgrading the spamassassin files at the same time. (Yes there are other ways to do it but this is easy). If you do NOT want spamassassin enabled in all of your Ensim accounts then you'll need to come up with a way to do it selectively.
now, I do maintanance JUST incase :
/usr/local/sbin/set_pre_maintenance
/usr/local/sbin/set_maintenance
/usr/local/sbin/set_post_maintenance
/sbin/service webppliance restart
And do a restart of mailscanner and SpamAssassin (I know the pre maintanance does this.. but just to see any errors.)
/sbin/service MailScanner restart
/sbin/service spamassassin restart
You may want to just do a server restart, as somtimes spamd doesnt restart correctly
NOW!!!! let SpamAssassin check 200 spams and its bayesian filters will learn from those spams.. and the more you use it the better it gets
I use the MailScanner MailWatch to view my statistics:
http://forums.ev1servers.net/showthread.ph...&threadid=45146
I did notice a increase in spams and it decreased after 20 minutes or so..
once again I am not a HOW-To writer.. and I did this for my own sake..
USE AT YOUR OWN RISK!! and this was tested on Ensim 4.0.2
I also use DCC and RAZOR2 and RulesDeJour, I will make a how to for those shortly...
Recommended!!!!
CYBERLOT made a Razor2 How-to:
Here