View Full Version : SpamAssassin Upgrade

10-06-2004, 01:29 PM
A few months ago I upgraded my SpamAssassin to 2.63 using Jalal's awesome instructions.

Yesterday I tried to do the same for the company's installation but I got errors galore. I followed Jalal's method up to unpacking SA 2.63, at which point I get:

$ tar xzf Mail-SpamAssassin-2.63.tar.gz
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers

gzip: stdin: invalid compressed data--format violated
tar: Child returned status 1
tar: Error exit delayed from previous errors

Anyone know what this means or how to get past this stage? It still unpacks SA and creates the Mail-SpamAssassin-2.63 directory, but then there are a whole new bunch of errors when I proceed.

Any help would be greatly appreciated.



10-06-2004, 01:44 PM

untarzip Mil-SpamAssasin-2.63.tar.gz

10-06-2004, 02:59 PM
The whole set of errors indicate that you have a corrupted tar/gzip file there.
How did you load the file onto the server? Is there any chance it got transferred in ASCII mode?


10-06-2004, 03:45 PM

You were right Jalal. I had downloaded a trial version of WS FTP Home and being unfamiliar with it, I accidentally transferred it in ASCII mode. Now I'm stuck at installing Net::DNS::Resolver...seems the CPAN site is down. I'll try to finish the installation later.

Thanks again,


10-12-2004, 10:13 PM

Having trouble installing Net::DNS::Resolver. Here's what I get:

cpan shell -- CPAN exploration and modules installation (v1.76)
ReadLine support enabled

cpan> o conf makepl_arg ''

cpan> install Net::DNS::Resolver
Going to read /home/novatrendeng/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
Going to read /home/novatrendeng/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Tue, 12 Oct 2004 08:06:50 GMT
CPAN: HTTP::Date loaded ok
Going to read /home/novatrendeng/.cpan/sources/modules/03modlist.data.gz
Warning: Cannot install Net::DNS::Resolver, don't know what it is.
Try the command

i /Net::DNS::Resolver/

to find objects with matching identifiers.

Anyone know what that means? Is it possible that the latest version of Net::DNS::Resolver is not compatible with the version of Perl on the server?



10-13-2004, 01:40 AM
It means that it can't find the package in the database.


install Net::DNS

and see if that works...

10-13-2004, 07:34 AM
Thanks Jalal.

Net::DNS installed just fine. Any idea how to get the resolver to make SA fully functional?

Thanks again.


10-13-2004, 07:55 AM
I found something interesting:

http://cpan.uwinnipeg.ca/search?query=Net%3A%3ADNS%3A%3AResolver&mode=modul e

Does this mean Net::DNS::Resolver has been replaced with platform specific versions? If so, which one is the right one for the Westhost server?

Thanks again.


10-13-2004, 09:06 AM
Installing Net::DNS should have installed the Resolver package as well... I think.

Try running:
/spamassassin --lint -D
and check the output, it will tell you whether DNS::Resolver is enabled or not.

(might by /sa/bin/spamassassin depending on how your installation is done).

10-13-2004, 09:16 AM

Net::DNS didn't install the resolver (at least the /spamassassin --lint -D command shows it is not available).

I'm guessing one of the platform specific versions of Net::DNS::Resolver needs to be installed, but I'm not sure if it should be the ::Base or ::Unix one. Any thoughts?


10-13-2004, 10:26 AM
This gets more and more confusing.

I tried to install Net::DNS::Resolver::Base and it was already up to date. I then tried to install Net::DNS::Resolver::UNIX and again, it was reported to be up to date. So maybe installing Net::DNS did install the resolver. Yet $ /sa/bin/spamassassin --lint -D shows that Net::DNS::Resolver is not available.

Any suggestions?


10-13-2004, 10:35 AM
One more thing...

/spamassassin --lint -D shows Net::DNS::Resolver is available (old SA)
/sa/bin/spamassassin --lint -D shows Net::DNS::Resolver is unavailable (new SA 2.63)


10-13-2004, 12:58 PM
So, its installed. And one program finds it and one doesn't?

Are you using the PERL5LIB environment variable? If so, what is it set to?

What is the output of:
'find / -xdev -name Resolver.pm -print'

10-13-2004, 01:10 PM
Here's the output:

[novatrendeng][/]$ find / -xdev -name Resolver.pm -print
find: /etc/depend: Permission denied
find: /var/www/html/fm/users: Permission denied


10-13-2004, 02:17 PM
OK, when I run the command I get a double installation of Resolver, one in the /perl5lib tree and one in the /usr/local/perl tree.

Now, back at the start, when you tried the install you unset the makepl_arg with
o conf makepl_arg ''
which would have installed the Net::DNS modules in the standard Perl tree, but possibly you forgot that with the second time you installed and it has been installed in the /perl5lib tree.

Now, you have two choices:
1. forget about the /perl5lib tree and reinstall the Net::DNS package in the 'normal' place.
2. 'cp -a /perl5lib/lib/i686-linux/Net /usr/local/perl/lib/site-perl/5.6.0/i686-linux/Net'
and cross your fingers :) cause I'm not sure that will work...

Hope that was sort of clear...

10-13-2004, 08:15 PM
Getting closer...

Thanks for the suggestions, Jalal. Neither one worked, exactly, but a slightly modified option 2 did the trick:

'cp -r /perl5lib/lib/i686-linux/Net /usr/local/perl/lib/site_perl/5.6.0/i686-linux/'

Now I have one more hurdle. When I try to move spamassassin, I get:

[novatrendeng][/]$ mv spamassassin spamassassin-2.53
mv: overwrite `spamassassin-2.53'? y
mv: cannot unlink `spamassassin': Operation not permitted
mv: cannot remove `spamassassin': Operation not permitted

Can it be a problem that spamassassin has root permissions? If so, can it be overcome?

Just trying to link the new spamassassin gives:

[novatrendeng][/]$ ln -s /sa/bin/spamassassin spamassassin
ln: `spamassassin': File exists

Thanks again for the help.


10-14-2004, 01:17 AM
Some installations on WH seem to have /spamassassin owned by root, which means you can't change it.

In that case you just need to tell procmail to use the new version. Somewhere in the /etc/procmailrc file there will be a reference to /spamassassin, change that to /sa/bin/spamassassin and it will use the new version.
This is mentioned at the end of my page on Perl/Spamassassin updates.


10-14-2004, 11:14 AM
Denis, this might work: http://forums.westhost.com/phpBB2/viewtopic.php?p=8688&highlight=#8688