Problems with SA/Mailscanner using different perl versions

Mark Fyvie mailscanner at MARKF.MAILSHELL.COM
Tue Nov 16 14:26:34 GMT 2004


Hi Martin,

        Thanks for that tip, I found that I had originally been using the
rpm version, I found (on closer inspection) that the non-rpm version had an
additional --perl switch, and I used this (and while it was installing I saw
it referencing the 5.8.0 version of perl!). So this installed a parallel
version of mailscanner in /opt/MailScanner, so I decided to keep this one
and changed the check_mailscanner file to point to this one instead.
Relevant config options:

process=MailScanner
msbindir=/opt/MailScanner/bin (the location of the freshly installed
MailScanner which points to my 5.8.0 version of perl)
config=/etc/MailScanner/MailScanner.conf (my existing config file)

# These seem to get put all over the shop...
PATH=/home/perl/bin:/usr/bin:/bin (I put the new perl path in front just in
case...)
export PATH
PERL=/home/perl/bin/perl (the path to my 5.8.0 version)

        I then fire up mailscanner in debug mode, and get the same error I
got before :-(

Starting MailScanner daemons:
         incoming sendmail: ok
         outgoing sendmail: ok
         MailScanner:       In Debugging mode, not forking...
SpamAssassin installation could not be found at
/opt/MailScanner/lib/MailScanner/SA.pm line 119

The relevant line is:
   MailScanner::Log::DieLog("SpamAssassin installation could not be found")
      unless eval "require Mail::SpamAssassin";

So as I understand it, the SA modules are not being found in my perl
installation. So I double checked:

[root MailScanner]# /home/perl/bin/perl -MMail::SpamAssassin -e 1

Nothing is returned, so the module is installed. This confirms that it is
living in my 5.8.0 version

[root MailScanner]# /usr/bin/perl -MMail::SpamAssassin -e 1
Can't locate Mail/SpamAssassin.pm in @INC (@INC contains:
/usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .).
BEGIN failed--compilation aborted.

This is my 5.005 version. SpamAssassin doesn't live there (because I deleted
it earlier, since 3.0 and above can't run with this version)

[root MailScanner]# perl -MMail::SpamAssassin -e 1
Can't locate Mail/SpamAssassin.pm in @INC (@INC contains:
/usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .).
BEGIN failed--compilation aborted.

This just confirms that the path environment variable brings us to the 5.005
version.

So I guess I am back to square 1: I've told MailScanner to use my 5.8.0
version, but it still seems to be running SA.pm with the old one. Is there
anything else I may have missed?

Mark

> -----Original Message-----
> From: MailScanner mailing list 
> [mailto:MAILSCANNER.at.JISCMAIL.AC.UK at mailscanner.at.markf.mai
> lshell.com] On Behalf Of Martin Hepworth
> Sent: 16 November 2004 14:17
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Re: Problems with SA/Mailscanner using different 
> perl versions
> 
> 
> Mark
> 
> if you use the tar.gz version to install there's an option on 
> the 'install' script to tell it where to look for the correct 
> perl version..
> 
> 
> --
> Martin Hepworth
> Snr Systems Administrator
> Solid State Logic
> Tel: +44 (0)1865 842300
> 
> 
> Mark Fyvie wrote:
> > Hi list,
> >
> >  I have a small problem. Well actually it is not so small. I'm no 
> > linux expert, but have had a bit of experience tinkering 
> around on my 
> > Cobalt RAQ4 (based on Redhat), so please bear with me...
> >
> >  I was running Mailscanner 4.30 and what I thought was SpamAssassin 
> > 2.63 (turns out that Mailscanner 4.30 was actually referencing a 
> > previous installation of SA 2.55!). Last weekend I decided 
> to upgrade 
> > to SpamAssassin 3.01, so at the same time I upgraded to MailScanner 
> > 4.35.
> >
> >  After reading through all the help files, FAQs, and every bit of 
> > documentation I could find for MailScanner and SpamAssassin 
> I did make 
> > considerable progress. For example, I discovered that SA 2.55 was 
> > still being referenced by the new version of MailScanner 
> and all sorts 
> > of other issues. I completely purged my system of previous 
> versions of 
> > both programs.
> >
> >  Before I go on I should mention that I am running two versions of 
> > Perl, and have been doing so for quite some time. The 
> version which is 
> > shipped with the RAQ4 is 5.005. I also installed 5.8.0 in 
> parallel to 
> > this. If I need to use the newer version in a given script 
> I usually 
> > just change the #!/usr/bin/perl line at the start of the 
> script. Why 
> > did I keep the old version of perl? Well after some 
> investigation it 
> > seems that many of the built-in functions and scripts used 
> by the RAQ 
> > will break if the original perl version is removed, so I decided to 
> > run both in parallel.
> >
> >  Now the issue here is that the new SpamAssassin no longer 
> works with 
> > any of the old perl versions, so I installed it into my 5.8.0. The 
> > problem I have is that MailScanner is running with my 5.005 
> version, 
> > so when SA.pm does its check to see if SpamAssassin is present, it 
> > reports that it cannot find SpamAssassin. I've tried 
> playing with the 
> > paths in the MailScanner.conf file, turning on all the 
> debugs, adding 
> > the line #!/home/perl/bin/perl (this points to 5.8.0) to 
> SA.pm, but no 
> > luck.
> >
> >  I tried to reinstall MailScanner (I always did it via 
> make) to see if 
> > there were any options I could choose to specify a 
> different copy of 
> > perl, but I could find no such options. I could find routines that 
> > searched for multiple versions of perl and simply told the 
> user that 
> > it wasn't a good idea. The FAQ on the mailscanner site says 
> something 
> > similar, along the lines of "It's not bad to have more than one 
> > version, but you'll have less problems if you choose just one".
> >
> >  My problem is that I can't just have one version. My question is 
> > this: How do I either A> Install mailscanner so that it 
> uses my 5.8.0 
> > version exclusively, or B> Tell it to use 5.8.0 when it calls any 
> > scripts related to the use of SpamAssassin?
> >
> >  Thanks in advance for your help.
> >
> > Regards,
> > Mark
> >
> > ------------------------ MailScanner list 
> ------------------------ To 
> > unsubscribe, email jiscmail at jiscmail.ac.uk with the words: 'leave 
> > mailscanner' in the body of the email. Before posting, read the MAQ 
> > (http://rd.mailshell.com/www.mailscanner.biz/maq/) and the archives 
> > (http://rd.mailshell.com/www.jiscmail.ac.uk/lists/mailscanner.html).
> >
> > Support MailScanner development - buy the book off the website!
> 
> **********************************************************************
> 
> This email and any files transmitted with it are confidential 
> and intended solely for the use of the individual or entity 
> to whom they are addressed. If you have received this email 
> in error please notify the system manager.
> 
> This footnote confirms that this email message has been swept 
> for the presence of computer viruses and is believed to be clean.
> 
> **********************************************************************
> 
> ------------------------ MailScanner list 
> ------------------------ To unsubscribe, email 
> jiscmail at jiscmail.ac.uk with the words: 'leave mailscanner' 
> in the body of the email. Before posting, read the MAQ 
> (http://rd.mailshell.com/www.mailscanner.biz/m> aq/) and the 
> archives 
> (http://rd.mailshell.com/www.jiscmail.ac.uk/lists/mailscanner.html).
> 
> Support MailScanner development - buy the book off the website!
> 
> 
> ---------- Your email is protected by Mailshell ---------- 
> To block spam or change delivery options: 
> http://www.mailshell.com/control.html?a=bmy5s24s45xydj4ejzp36_
bv07u4ae_c48_jl5

FreshAddress.com http://rd.mailshell.com/ad482
Earn up to $3 for each of your friends who signs up with Mailshell!
http://rd.mailshell.com/sp5

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list