Upgrading SpamAssassin on Fedora 4 server.

Download the lastet version of SpamAssassin version 3.2.5, the file name is Mail-SpamAssassin-3.2.5.tar.gz. You can get the latest version from spamassassin.apache.org.

In this step by step example I am upgrading SpamAssassin version 3.0.3-4.fc4 to 3.2.5 on my Fedora 4 server.

After you download the lastest version, build the rpm using this file, the command to do that is below.

sudo rpmbuild -tb Mail-SpamAssassin-3.2.5.tar.gz

This will create two files, perl-Mail-SpamAssassin-3.2.5-1.i386.rpm and spamassassin-3.2.5-1.i386.rpm in the folder /usr/src/redhat/RPMS/i386.

Install this file first with the following command,

rpm -i perl-Mail-SpamAssassin-3.2.5-1.i386.rpm

Uninstall Evolution first because it dependencies that relies on Spamassassin 3.0.3-4.fc4, otherwise you will receive an error when uninstalling SpamAssassin version 3.0.3. Evolution is an email client for Linux, similar to Outlook for Windows.

Uninstall in the following order:
rpm -e evolution-connector-2.2.2-5.i386
rpm -e evolution-devel-2.2.2-5.i386
rpm -e evolution-2.2.2-5.i386

Check to see whcih version of Spam Assassin is installed.

rpm -q spamassassin

To uninstall run this command.

rpm -e spamassassin-3.0.3-4.fc4

You will see this warning message.
warning: /etc/mail/spamassassin/spamassassin-default.rc saved as /etc/mail/spamassassin/spamassassin-default.rc.rpmsave

Confirm that SpamAssassin has been uninstalled.
rpm -q spamassassin
package spamassassin is not installed

Now install the new version of SpamAssassin.

rpm -i spamassassin-3.2.5-1.i386.rpm

Check to see if the installation was successful.
rpm -q spamassassin

Now copy this file that was renamed during the uninstallation of the previous version.
cp -i spamassassin-default.rc.rpmsave spamassassin-default.rc

If you are interested here is the contents of the file spamassassin-default.rc.
# send mail through spamassassin
| /usr/bin/spamassassin
# Drop all spam emails to /dev/null
* ^X-Spam-Status: Yes
# send mail through spamassassin
| /usr/bin/spamassassin
# Drop all spam emails to /dev/null
* ^X-Spam-Status: Yes

The final step is to start the SpamAssassin service.

service spamassassin start
Starting spamd: [ OK ]

If you wish you can now download and install the latest version of Evolution from projects.gnome.org/evolution. I may do that sometime, as I do not use it.

Well after I completed the above steps, it seems that SpamAssassin was not working. I then decided to read the documentation avaiable on the website. I guess I should have doen that first.

Anyhow, these are the steps I missed. Edit the file /etc/mail/spamassassin/local.cf.

Remove the comment (#) from these lines as shown below

# Add *****SPAM***** to the Subject header of spam e-mails
rewrite_header Subject *****SPAM*****

# Set the threshold at which a message is considered spam (default: 5.0)
required_score 8

# Use Bayesian classifier (default: 1)
use_bayes 1

# Bayesian classifier auto-learning (default: 1)
bayes_auto_learn 1

Then edit the file /etc/mail/spamassassin/spamassassin-default.rc, and add these lines if it’s not there.

# send mail through spamassassin

| /usr/bin/spamassassin

Restart spamd.
service spamassassin restart

Be Sociable, Share!

6 comments for “Upgrading SpamAssassin on Fedora 4 server.

  1. Joelle Koenemund
    February 7, 2010 at 1:03 pm

    Your blog is awesome! I found it on Yahoo and couldn?t resist reading it. You have some good tips here. Thanks for posting!

  2. Andrew A. Sailer
    January 9, 2010 at 11:45 am

    Great information! Thanks!

  3. Dana Onorata
    January 8, 2010 at 9:01 am

    Hello – just a brief note to say thanks for this article. Very good.

  4. Loanman
    December 26, 2009 at 9:37 am

    Hi, perhaps our entry may be off topic but anyways, I have gone browsing around your weblog and it seems truly professional. It’s obvious that you know your topic and you seem passionate about it. I’m creating a fresh web site plus I’m attempting to make it look great, plus provide high quality subject matter. Having gleaned much visiting your web site in addition to I anticipate even more articles and will be returning soon. Thanks.

  5. virus code
    December 24, 2009 at 8:08 pm

    Epic :) It’s too bad more people haven’t heard about this site, this article covered just what I needed to know.

  6. payday loans bc
    December 10, 2009 at 2:47 am

    Hello!!! http://www.gamescheat.ca is one of the best resourceful websites of its kind. I enjoy reading it every day. All the best.

Leave a Reply

Your email address will not be published. Required fields are marked *