Here is the method I used to install Spam Assassin on 5.5 (I would assume the same method would apply to 5.1.2) -- I am not making any guarantees that this will work for you or anyone else who reads this and will not be held responsible for any downtime/damage/medical problem/etc.. that is caused directly or indirectly from following these instructions.. And with that said, here is the routine I used..
Access the server command line (login as root) -- Issue the following commands:
mkdir sa
cd sa
wget
http://www.spamassassin.org/released/Mail-SpamAssassin-2.31.tar.gzwget
http://www.geckohost.com/spamassassinwget
http://www.gbnet.net/~jrg/qmail/ifspamhwget
http://cr.yp.to/software/mess822-0.58.tar.gzIf you do not have make & gcc -- get them using the following ..
wget
http://www.myezserver.com/downloads/mitel/contrib/dev-tools/cpp-2.96-85.i386.rpmwget
http://www.myezserver.com/downloads/mitel/contrib/dev-tools/gcc-2.96-85.i386.rpmwget
http://www.myezserver.com/downloads/mitel/contrib/dev-tools/make-3.79.1-5.i386.rpmwget
http://www.myezserver.com/downloads/mitel/contrib/dev-tools/kernel-headers-2.2.19-7.0.8.i386.rpmwget
http://www.myezserver.com/downloads/mitel/contrib/dev-tools/glibc-devel-2.2.4-19.i386.rpmThese should be in the correct order ..
rpm -ivh make-3.79.1-5.i386.rpm
rpm -ivh kernel-headers-2.2.19-7.0.8.i386.rpm
rpm -ivh glibc-devel-2.2.4-19.i386.rpm
rpm -ivh cpp-2.96-85.i386.rpm
rpm -ivh gcc-2.96-85.i386.rpm
Unzip/tar Spam Assassin / mess822 ...
gunzip Mail-SpamAssassin-2.31.tar.gz
tar -xf Mail-SpamAssassin-2.31.tar.gz
gunzip mess822-0.58.tar.gz
tar -xf mess822-0.58.tar.gz
Go into the Spam Assassin folder ..
cd Mail-SpamAssassin-2.31
Compile Spam Assassin...
perl Makefile.PL
make
make install
Go into the Mess822 folder ..
cd ../mess822-0.58
make
make setup check
Install ifspamh (There should be no need to configure this)
cd ..
chmod 755 ifspamh
cp ifspamh /usr/bin
Install the startup script ..
chmod 755 spamassassin
cp spamassassin /etc/rc.d/init.d
ln -s /etc/rc.d/rc7.d/S99spamassassin /etc/rc.d/init.d/spamassassin
ln -s /etc/rc.d/rc6.d/K40spamassassin /etc/rc.d/init.d/spamassassin
At this point, Spam Assassin is installed -- to run the daemon issue the command:
/etc/rc.d/init.d/spamassassin start
However, at this point in time, there are no users setup to use SpamAssassin's services --- If you want to only setup individual users, go to their home folders (under /home/e-smith/files/users/username (username = user account name)) and issue the following:
cp .qmail .qmail-isspam
pico .qmail (or your favorite text editor)
change ./Maildir/ to say the following:
|ifspamh username-isspam (username = user account name)
./Maildir/
Now when mail is received on that account, it will run through Spam Assassin..
If you want to automatically enable Spam Assassin on new accounts, you will need to do the following (NOTE: I would imagine there is a much better way to accomplish this, but this does work)
cp /home/e-smith/files/users/username/.qmail-isspam /etc/e-smith/skel/user/
mkdir /etc/e-smith/templates-user-custom/.qmail
cp /etc/e-smith/templates-user/.qmail/. /etc/e-smith/templates-user-custom/.qmail/
pico /etc/e-smith/templates-user-custom/.qmail/e-smithForward20
Modify the first if clause:
Original:
if ($EmailForward eq "local")
{
$OUT = "./Maildir/\n";
}
Modified:
if($EmailForward eq "local");
{
$OUT = "|ifspamh " . $USERNAME . "-isspam\n";
$OUT .= "./Maildir/\n";
}
NOTE: Notice the period after the second $OUT ....
Save the changes to the file ..
Spam Assassin should now be installed on the system, automatically starting the daemon when the server boots and automatically enabling on new accounts.. I am currently using it with RAV Antivirus installed and everything is coexisting rather nicely..
Hope this helps.