How-To: Upgrading Spamassassin to 2.63

americanintel

Verified User
Joined
Mar 1, 2004
Messages
126
Location
Granbury, TX
Just thought I'd post this since it worked for me. Upgraded spamassassin from 2.55 to 2.63.

su to root

#cd /usr/local/directadmin/scripts/

#cp spam.sh spam.sh.bak

#rm spam.sh

#pico spam.sh

paste the following into your new spam.sh file (make sure you put the whole url for the 2.63 file in the spam.sh file as it gets truncated here in the forum)
#############

#!/bin/sh

#Installs Spam Assassin 2.63

FILE="/usr/local/directadmin/scripts/Mail-SpamAssassin-2.63.tar.gz";

wget http://www.spamassassin.org/released/Mail-SpamAssassin-2.63.tar.gz

if [ ! -e ${FILE} ]
then
echo "Cannot find ${FILE} !! Make sure it exists.";
exit -1;
fi

tar xzf ${FILE} -C /usr/local/directadmin/scripts/packages
chown -R root:root /usr/local/directadmin/scripts/packages/Mail-SpamAssassin-2.63

cd /usr/local/directadmin/scripts/packages/Mail-SpamAssassin-2.63

export LANG=C
/usr/bin/perl Makefile.PL
make
make install

exit 0;
##################

service spamassassin restart

then...

#chmod 700 spam.sh
#chown diradmin:diradmin spam.sh
#./spam.sh

Spamassassin didn't seem to restart for me with the command in the spam.sh file.... I didn't check real hard but my first test email still showed it being filtered by 2.55 so I gave it a:

# /etc/rc.d/init.d/spamassassin restart

which worked just fine.

Sent a test email and voila!

X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on
server.mydomain.net
X-Spam-Level:
X-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,HTML_60_70,HTML_MESSAGE
autolearn=no version=2.63

If you see anything wrong with this let me know and I will update but it worked fine for me.
 
Last edited:

interfasys

Verified User
Joined
Oct 31, 2003
Messages
2,099
Location
Switzerland
Bug!

You use
FILE="/usr/local/directadmin/scripts/packages/Mail-SpamAssassin-2.63.tar.gz";

but wget will save the file in scripts/



The following won't work if MailScanner is activated because MailScanner takes control of SpamAssassin

#service spamassassin restart
spamassassin: unrecognized service

and

-bash: /etc/rc.d/init.d/spamassassin: No such file or directory
 
Last edited:

americanintel

Verified User
Joined
Mar 1, 2004
Messages
126
Location
Granbury, TX
I fixed the first typo.. I was correcting on the fly when posting but

# /etc/rc.d/init.d/spamassassin restart
Shutting down spamd: [ OK ]
Starting spamd: [ OK ]

as you can see that works just fine.

#tail /var/log/messages

Mar 16 13:14:33 server spamassassin: spamd shutdown succeeded
Mar 16 13:14:34 server spamassassin: spamd startup succeeded

Am I missing something? I'm not proclaiming to be an expert on this stuff.. heck I'm trying to figure it all out myself but just wanted to share any bits of knowledge I may pickup.
 

americanintel

Verified User
Joined
Mar 1, 2004
Messages
126
Location
Granbury, TX
What's it? Am I doing something wrong?

ps auxf

mail 3499 0.0 0.1 6232 1780 ? S 05:06 0:00 /usr/sbin/exim -C /etc/exim_outgoing.conf -q15m
mail 8362 0.0 0.1 6236 1816 ? S 05:35 0:00 /usr/sbin/exim -C /etc/exim.conf -bd
mail 8365 0.0 0.1 6232 1780 ? S 05:35 0:00 /usr/sbin/exim -C /etc/exim_outgoing.conf -q15m
mail 8879 0.0 1.5 20672 16444 ? S 05:36 0:00 /usr/bin/perl -I/usr/lib/MailScanner /usr/sbin/MailScanner /etc/MailScanner/MailSc
mail 1404 0.0 1.6 21072 16920 ? S 13:40 0:00 \_ /usr/bin/perl -I/usr/lib/MailScanner /usr/sbin/MailScanner /etc/MailScanner/Ma
mail 1417 0.0 1.6 21048 16904 ? S 13:40 0:00 \_ /usr/bin/perl -I/usr/lib/MailScanner /usr/sbin/MailScanner /etc/MailScanner/Ma
mail 1472 0.0 1.6 21000 16856 ? S 13:41 0:00 \_ /usr/bin/perl -I/usr/lib/MailScanner /usr/sbin/MailScanner /etc/MailScanner/Ma
mail 1498 0.0 1.6 21036 16888 ? S 13:43 0:00 \_ /usr/bin/perl -I/usr/lib/MailScanner /usr/sbin/MailScanner /etc/MailScanner/Ma
mail 1593 0.1 1.6 21072 16924 ? S 13:46 0:00 \_ /usr/bin/perl -I/usr/lib/MailScanner /usr/sbin/MailScanner /etc/MailScanner/Ma
root 24663 0.0 2.0 25196 21224 ? S 13:14 0:01 /usr/bin/spamd -d -c -a
 
Top