New experience on using SpamAssassin - 2
At first, I try to identify the problem but no luck. The final decision I made was: uninstall the package.
rpm –e spamassassin # success
yum install spamassassin # success
The above install script ONLY install the Fedora 4 version, at writing time is 3.0.6-1. However, in the official website the latest stable version is 3.1.3.
Then I uninstall that old version. Reinstall the new version in tar.gz format.
Since I am not very familiar with using tar.gz to install (Well, actually I did the following:
perl –MCPAN –e
cpan> cpan Mail::SpamAssassin
make
make install
however no luck again), I just gave up using that method and using another rpm method: rpmbuild.
Please alert that: rpmbuild is, by default, NOT INSTALL together with Fedora 4. So to use the rpmbuild function, first install rpm-build by typing:
yum install rpm-build
then you can issue the command, which is copied from http://spamassassin.apache.org/downloads.cgi?update=200606050750 website:
rpmbuild -tb Mail-SpamAssassin-3.1.3.tar.gz
Once the process finished, go to : /usr/src/redhat/RPMS/i386 to find your built rpm(s), in this case, there are 2 rpm files:
Perl-Mail-SpamAssassin—3.1.3-1-i386.rpm
Mail-SpamAssassin—3.1.3-1-i386.rpm
The remaining install steps are easy, please install the Perl one first, otherwise you will be prompted an error:
rpm –ivh Perl-Mail-SpamAssassin—3.1.3-1-i386.rpm
rpm –ivh Mail-SpamAssassin—3.1.3-1-i386.rpm
The installation is now finished. Start the service than:
/etc/rc.d/init.d/spamassassin start
Check if it works by issuing this command:
netstat –aup | grep spamd
and testing the spamc by issuing this command:
spamc –R < (the directory where sample-nonspam/spam.txt exists)
If they are all okay, your spamassassin is about to go.
Try mail a sample-spam.txt to your account by issuing this command:
mail
Then watch these 2 log files;
/var/log/procmail.log # To see whether /etc/procmailrc work
/var/log/maillog # To see the process of spamd work.
There are one more important thing: spamassassin heavily (I think) depends on /etc/procmailrc file, which is a text file of finding whether an email match specific patterns. If match, send it to somewhere else.
To make spamassassin work well with procmailrc, some lines should be added to /etc/procmailrc:
:0fw:
* < style=""> # To specify the max size which should be processed
| /usr/bin/spamc
* ^X-Spam-Status: Yes
/dev/null
The old way:
:0fw:
| /usr/bin/spamc –s 80000000
seems not work as when I remove the –s switch, it can identify the spam again.
Comments