Categories
Plesk Technology

Upgrading Spamassassin on Plesk servers

Upgrading Spamassassin on a Plesk server is not difficult and can take only a few minutes. This example describes upgrading from Spamassassin version 2.64 to version 3.1.7 on Plesk 7.5

To get the current version of Spamassassin on your server type:


spamassassin –version

To get the latest version of Spamassassin go here http://spamassassin.apache.org/

Once you have downloaded the tar or zip file, unzip / untar the archive on your server and execute the following commands.


cd Mail-SpamAssassin-*
perl Makefile.PL
	[option: add -DSPAMC_SSL to $CFLAGS to build an SSL-enabled spamc]
make
make install

While in the Mail-SpamAssassin directory, you should run the included tests. These tests will let you know if you are missing any modules or if the versions are too old.


spamassassin -t < sample-nonspam.txt > nonspam.out
spamassassin -t < sample-spam.txt > spam.out

Here you may see warnings for several items, for example IO::Socket::INET6 Simply enter this into google and you should find the module to download. These are usually .tar files and you simply untar them and follow the instructions in the README or related text files.

Next you will need to modify the startup script to deal with commandline parameter changes.

Edit the file /etc/init.d/spamassassin and find SPAMDOPTIONS
Remove the parameter –a and save the file.

Next you will need to modify configuration scripts to deal with changes.

Edit the file /etc/mail/spamassassin/local.cf
Comment out (or delete) the rewrite_subject and subject_tag fields and replace them with the rewrite_header field.


required_hits   7
# rewrite_subject       1
# subject_tag   *****SPAM*****
rewrite_header Subject ****SPAM(_SCORE_)****
report_safe 0

Next you will need to make the same changes for each mailbox that has it’s own config file. Check for the user_prefs file in each mailbox for each domain.

/var/qmail/mailnames/domainname/mailname/user_prefs

Finally you should restart spamassassin


/etc/init.d/spamassassin restart
/etc/init.d/psa-spamassassin restart

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.