Upgrade SpamAssassin Centos 5.5

My new company’s mail server use Postfix with MySQL database, SpamAssassin as an anti-spam tool, ClamAV as an anti-virus tool and running on Linux Centos 5.5 operating system. The version of SpamAssassin tool installed in the system is 3.2.5 which is out-dated because the current stable version of it is SpamAssassin version 3.3.1.

To effectively combat with spams, I have to upgrade it. Before you upgrade, it is better to read this note from the developers to make sure the upgrade will run smoothly.

Without any ado, here is the step-by-step upgrading SpamAssassin to version 3.3.1:

Login to the Centos 5.5 box

To upgrade any packages in Centos 5.5, you can use either ‘yum upgrade <package-name>’ or ‘yum update <package-name>’, so to upgrade SpamAssassin run the command below using root / super user account.

# yum upgrade spamassassin

The yum script will retrieve repository sites to check the available software update then download and install it.

Loading "installonlyn" plugin
Setting up Upgrade Process
Setting up repositories
rpmforge 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 1.9 kB 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 2.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 4.0 MB 00:09
################################################## 11094/11094
primary.xml.gz 100% |=========================| 170 kB 00:00
################################################## 319/319
primary.xml.gz 100% |=========================| 101 kB 00:00
################################################## 285/285
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
--> Downloading header for spamassassin to pack into transaction set.
spamassassin-3.3.1-2.el5. 100% |=========================| 58 kB 00:00
--> Package spamassassin.i386 0:3.3.1-2.el5 set to be updated
--> Running transaction check
--> Processing Dependency: perl(NetAddr::IP) >= 4.000 for package: spamassassin
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
--> Downloading header for perl-NetAddr-IP to pack into transaction set.
perl-NetAddr-IP-4.044-1.e 100% |=========================| 13 kB 00:00
--> Package perl-NetAddr-IP.i386 0:4.044-1.el5.rf set to be updated
--> Running transaction check

Dependencies Resolved

================================================
Package Arch Version Repository Size
================================================
Updating:
spamassassin i386 3.3.1-2.el5 base 1.1 M
Installing for dependencies:
perl-NetAddr-IP i386 4.044-1.el5.rf rpmforge 140 k

Transaction Summary
================================================
Install 1 Package(s)
Update 1 Package(s)
Remove 0 Package(s)

Total download size: 1.3 M
Is this ok [y/N]: y

Accept the above question with ‘y’ to confirm the upgrading.

Downloading Packages:
(1/2): perl-NetAddr-IP-4. 100% |=========================| 140 kB 00:01
(2/2): spamassassin-3.3.1 100% |=========================| 1.1 MB 00:06
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-NetAddr-IP ######################### [1/3]
Updating : spamassassin [2/3]warning: /etc/mail/spamassassin/local.cf created as /etc/mail/spamassassin/local.cf.rpmnew
Updating : spamassassin [2/3]warning: /etc/mail/spamassassin/v310.pre created as /etc/mail/spamassassin/v310.pre.rpmnew
Updating : spamassassin ######################### [2/3]
Cleanup : spamassassin ######################### [3/3]

Dependency Installed: perl-NetAddr-IP.i386 0:4.044-1.el5.rf
Updated: spamassassin.i386 0:3.3.1-2.el5
Complete!

If there is no error like above, the SpamAssassin has been successfully upgraded to version 3.3.1-2.el5.
Run ‘spamassassin -V’ to verify.

# spamassassin -V
SpamAssassin version 3.3.1
running on Perl version 5.8.8

Now it is the time to restart the SpamAssasin service.

# /etc/init.d/spamassassin restart

Try to send in / out an email and check the email log at /var/log/maillog. If you encounter any issues, let us know by dropping comments below!