Hi Guys,
I am just going to share my 4 hour experience trying to get SpamAssassin 3.2.0 installed with latest spam.sh (DA 1.2.96) and Perl 5.8.8
Firstly I am running RHEL3
Since SpamAssassin 3.2.0 required Perl 5.8.8 so my first step was to get Perl 5.8.8 installed. Since I didn't want to use the compiling by source method so I started looking at any RPM availables and didn't find any. Then I came across a website that mentioned that PERL 5.8.8 is shipped with RHEL5 and 5.8.5 with RHEL4. So I started looking for RPM from rpmfind and I found a RPM perl-5.8.8-10.src.rpm. I downloaded and tried to build it.
It took around 6 - 7 mins and it got compiled successfully and then I did this to install it
and it all worked without any issues.
Now comes the trouble. I then thought of installing SpamAssassin using ./spam.sh under /usr/local/directadmin/scripts/
I tried to edit spam.sh to change the SpamAssassing from 3.1.8 to 3.2.0 using vi and vi then stopped to work
. It started complaining about not been able to find some shared libraries libperl.so
I then started researching on how to fix it as vi was very important. Few websites mentioned about recompiling vi and then I came across a website that had a solution. Below are the steps to fix anything if you come across any shared library issue:
After doing this got vi working !!!
Now I was then able to vi spam.sh to edit the SpamAssassin Version from 3.1.8 to 3.2.0 and run
It seems to worked but then there were alot of errors in /var/log/maillog when I restarted exim using /etc/rc.d/init.d/exim restart.
when I tried to run this from the command prompt, spamd started complaining about script version 3.0200 and modules version 3.0108 mismatch
Then again I started doing some research and after a long time and some thought found that having different versions of SpamAssassin in different versions of perl can cause issues then found out that spamd was trying to read some packages from /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin folder and I got to wonder why spamd is still referring to old version of perl. So I thought to remame /usr/lib/perl5/site_perl/5.8.0/Mail to /usr/lib/perl5/site_perl/5.8.0/Mail-removed as /usr/lib/perl5/site_perl/5.8.0/Mail was already there in /usr/lib/perl5/site_perl/5.8.8/Mail/ and this is where SpamAssassin was installed.
Bang!!!!!!! I restarted spamassassin by restarting exim and this time less errors.
SpamAssassin was then compailing about some parse issues in
/etc/mail/spamassassin/local.cf
So did some research again and found out that rewrite_subject and subject_tag are depricated and should be replaced with rewrite_header Subject ****SPAM(_SCORE_)****
so in my "/etc/mail/spamassassin/local.cf" I replaced those two directives with
rewrite_header Subject ****SPAM(_SCORE_)****
This is how it looks like currently
I then also checked the template used by DirectAdmin for a new user preference file and found that it is also using the directives that are depricated.
So could JOHN please have a look at the documentation for SpamAssassin 3.2.x and any future releases they may not be able to understand these directive and get these changes accordingly in the new release of DirectAdmin
NOT TO MENTION THAT on startup spamd still gives this error, which I think is a known bug (i think) if you dont have razor, pyzor installed
I think I am in no mood to touch the server for the next couple of days now!!!!!!!!!!!!!!!!!!!
Thanks
Rohit
I am just going to share my 4 hour experience trying to get SpamAssassin 3.2.0 installed with latest spam.sh (DA 1.2.96) and Perl 5.8.8
Firstly I am running RHEL3
Since SpamAssassin 3.2.0 required Perl 5.8.8 so my first step was to get Perl 5.8.8 installed. Since I didn't want to use the compiling by source method so I started looking at any RPM availables and didn't find any. Then I came across a website that mentioned that PERL 5.8.8 is shipped with RHEL5 and 5.8.5 with RHEL4. So I started looking for RPM from rpmfind and I found a RPM perl-5.8.8-10.src.rpm. I downloaded and tried to build it.
Code:
rpmbuild --rebuild perl-5.8.8-10.src.rpm
Code:
#rpm -Uvh /usr/src/redhat/RPMS/i386/perl-5.8.8-10.i386.rpm
#rpm -Uvh /usr/src/redhat/RPMS/i386/perl-suidperl-5.8.8-10.i386.rpm
and it all worked without any issues.
Code:
[root@server root]# perl -v
This is perl, v5.8.8 built for i386-linux-thread-multi
Now comes the trouble. I then thought of installing SpamAssassin using ./spam.sh under /usr/local/directadmin/scripts/
I tried to edit spam.sh to change the SpamAssassing from 3.1.8 to 3.2.0 using vi and vi then stopped to work

I then started researching on how to fix it as vi was very important. Few websites mentioned about recompiling vi and then I came across a website that had a solution. Below are the steps to fix anything if you come across any shared library issue:
Code:
#which vi
#ldd /usr/bin/vim
....
libperl.so => not found
....
#rpm -ql perl | grep libperl.so
#ln -s <PATH TO LIBPERL.so> /lib/libperl.so
e.g /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so
After doing this got vi working !!!

Now I was then able to vi spam.sh to edit the SpamAssassin Version from 3.1.8 to 3.2.0 and run
Code:
#./spam.sh
It seems to worked but then there were alot of errors in /var/log/maillog when I restarted exim using /etc/rc.d/init.d/exim restart.
when I tried to run this from the command prompt, spamd started complaining about script version 3.0200 and modules version 3.0108 mismatch
Then again I started doing some research and after a long time and some thought found that having different versions of SpamAssassin in different versions of perl can cause issues then found out that spamd was trying to read some packages from /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin folder and I got to wonder why spamd is still referring to old version of perl. So I thought to remame /usr/lib/perl5/site_perl/5.8.0/Mail to /usr/lib/perl5/site_perl/5.8.0/Mail-removed as /usr/lib/perl5/site_perl/5.8.0/Mail was already there in /usr/lib/perl5/site_perl/5.8.8/Mail/ and this is where SpamAssassin was installed.
Bang!!!!!!! I restarted spamassassin by restarting exim and this time less errors.
Code:
[root@server Mail]# spamassassin -V
SpamAssassin version 3.2.0
running on Perl version 5.8.8
#spamassassin -D --lint
the above command was helpful when testing spamassassin
SpamAssassin was then compailing about some parse issues in
/etc/mail/spamassassin/local.cf
Code:
[20971] warn: config: failed to parse line, skipping, in "/etc/mail/spamassassin/local.cf": rewrite_subject 1
[20971] warn: config: failed to parse line, skipping, in "/etc/mail/spamassassin/local.cf": subject_tag [SPAM]
So did some research again and found out that rewrite_subject and subject_tag are depricated and should be replaced with rewrite_header Subject ****SPAM(_SCORE_)****
so in my "/etc/mail/spamassassin/local.cf" I replaced those two directives with
rewrite_header Subject ****SPAM(_SCORE_)****
This is how it looks like currently
# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)
# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.
required_hits 5
rewrite_header Subject ****SPAM(_SCORE_)****
report_safe 0
I then also checked the template used by DirectAdmin for a new user preference file and found that it is also using the directives that are depricated.
Code:
[root@server Mail]# cat /usr/local/directadmin/data/templates/user_prefs
|?RW_HEADER_SUB=rewrite_header subject `subject_tag`|
|*if subject_tag=""|
|?RW_HEADER_SUB=|
|*endif|
|*if VERSION3="yes"|
required_score |required_hits|
|RW_HEADER_SUB|
|*else|
required_hits |required_hits|
rewrite_subject |rewrite_subject|
subject_tag |subject_tag|
|*endif|
report_safe |report_safe|
|blacklist_from|
|whitelist_from|
So could JOHN please have a look at the documentation for SpamAssassin 3.2.x and any future releases they may not be able to understand these directive and get these changes accordingly in the new release of DirectAdmin
NOT TO MENTION THAT on startup spamd still gives this error, which I think is a known bug (i think) if you dont have razor, pyzor installed
[20971] dbg: rules: meta test DIGEST_MULTIPLE has undefined dependency 'DCC_CHECK'
[20971] info: rules: meta test HS_PHARMA_1 has dependency 'HS_SUBJ_ONLINE_PHARMACEUTICAL' with a zero score
I think I am in no mood to touch the server for the next couple of days now!!!!!!!!!!!!!!!!!!!

Thanks
Rohit
Last edited: