You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Chris <cp...@embarqmail.com> on 2014/07/15 07:11:20 UTC

SA and Ubuntu 14.04 LTS

After my Mandriva system crashed this weekend and after getting a new
box I've decided to use the above distro. I'm getting most issues worked
out however there are a few I need some help with. When running
'spamassasin -D -t against a saved message I get:

dbg: plugin: loading Mail::SpamAssassin::Plugin::DCC
from /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm
Jul 14 23:55:54.606 [23861] warn: plugin: failed to parse
plugin /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm:
Can't
locate /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm
in @INC (you may need to install
the ::usr::lib::perl5::site_perl::5.10.1::Mail::SpamAssassin::Plugin::DCC module) (@INC contains: /usr/share/perl5 /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl) at /usr/share/perl5/Mail/SpamAssassin/PluginHandler.pm line 109.


 warn: plugin: failed to parse plugin /etc/spamassassin/clamav.pm: Can't
locate File/Scan/ClamAV.pm in @INC (you may need to install the
File::Scan::ClamAV module) (@INC contains:
lib /usr/share/perl5 /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl) at /etc/spamassassin/clamav.pm line 14.
Jul 14 23:55:55.131 [23861] warn: BEGIN failed--compilation aborted
at /etc/spamassassin/clamav.pm line 14.
Jul 14 23:55:55.131 [23861] warn: Compilation failed in require
at /usr/share/perl5/Mail/SpamAssassin/PluginHandler.pm line 109.

The DCC.pm appears to be located here
- /usr/share/perl5/Mail/SpamAssassin/Plugin/DCC.pm

Any advice/assistance would be appreciated.

Chris




Re: SA and Ubuntu 14.04 LTS

Posted by Chris <cp...@embarqmail.com>.
On Thu, 2014-07-17 at 15:52 +0200, Matus UHLAR - fantomas wrote:
> >> On 16.07.14 19:36, Chris wrote:
> >> >installed via CPAN as I always have
> 
> >On Thu, 2014-07-17 at 09:13 +0200, Matus UHLAR - fantomas wrote:
> >> yes, that's why we have package distributions, to install packages in a
> >> semi-manual way.
> >>
> >> first check if you have installed spamassassin as ubuntu package, and if so,
> >> remove one of them...
> 
> On 17.07.14 08:45, Chris wrote:
> >You were correct Matus, it was apparently added when I did the initial
> >install last weekend. I removed it and installed from CPAN. However,
> >File::Scan::ClamAV will still not install, output is here -
> >http://pastebin.com/7B0bNFps  one additional note, the Ubuntu pkg
> >maintainer for Clam said it was easier if I installed from his pkg
> >rather than from source (I've always installed from source). Should I
> >remove the pkg and install from source and see what happens?
> 
> yes, that was precisely what I've meant in my first sentence.
> you rarely need SA installed from CPAN when there's package available
> (especially when other packages may depend on it, so it gets installed via
> packaging system even)
> 
Removed the SA that I'd installed via CPAN and tried installing the
Ubuntu pkg:

Running sa-compile (may take a long time)
plugin: failed to parse plugin /etc/spamassassin/clamav.pm: Can't locate
File/Scan/ClamAV.pm in @INC (you may need to install the
File::Scan::ClamAV module) (@INC
contains: /usr/share/perl5 /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl) at /etc/spamassassin/clamav.pm line 14.
BEGIN failed--compilation aborted at /etc/spamassassin/clamav.pm line
14.
Compilation failed in require
at /usr/share/perl5/Mail/SpamAssassin/PluginHandler.pm line 109.

rules: failed to run CLAMAV test, skipping:
	(Can't locate object method "check_clamav" via package
"Mail::SpamAssassin::PerMsgStatus" at (eval 1171) line 19.

Tried installing the Ubuntu pkg for File-Scan-Clamav, doesn't exist,
tried different names for it, no luck. Tried again from CPAN, same
errors as before. I'll be back later Matus, have to get to a Dr. appt at
the VA, thank you for your help and advice.

Chris



Re: SA and Ubuntu 14.04 LTS

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>> On 16.07.14 19:36, Chris wrote:
>> >installed via CPAN as I always have

>On Thu, 2014-07-17 at 09:13 +0200, Matus UHLAR - fantomas wrote:
>> yes, that's why we have package distributions, to install packages in a
>> semi-manual way.
>>
>> first check if you have installed spamassassin as ubuntu package, and if so,
>> remove one of them...

On 17.07.14 08:45, Chris wrote:
>You were correct Matus, it was apparently added when I did the initial
>install last weekend. I removed it and installed from CPAN. However,
>File::Scan::ClamAV will still not install, output is here -
>http://pastebin.com/7B0bNFps  one additional note, the Ubuntu pkg
>maintainer for Clam said it was easier if I installed from his pkg
>rather than from source (I've always installed from source). Should I
>remove the pkg and install from source and see what happens?

yes, that was precisely what I've meant in my first sentence.
you rarely need SA installed from CPAN when there's package available
(especially when other packages may depend on it, so it gets installed via
packaging system even)

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Spam is for losers who can't get business any other way.

Re: SA and Ubuntu 14.04 LTS

Posted by Chris <cp...@embarqmail.com>.
On Thu, 2014-07-17 at 09:13 +0200, Matus UHLAR - fantomas wrote:
> >> > On Wed, 2014-07-16 at 01:50 -0700, Ian Zimmerman wrote:
> >> >> There _is_ something wrong with his environment: he's running
> >> >> Ubuntu. :-)
> 
> >On Wed, 2014-07-16 at 18:40 -0500, Jonathan Nichols wrote:
> >> But a serious question that I haven’t seen asked yet - how did you
> >> install Spamassasin?  They’re usually pretty good about keeping the
> >> current version in the apt repository.  Did you do it from there or by
> >> hand?  I’m wondering if there’s a mix here somewhere.  :-)
> 
> On 16.07.14 19:36, Chris wrote:
> >installed via CPAN as I always have
> 
> yes, that's why we have package distributions, to install packages in a
> semi-manual way.
> 
> first check if you have installed spamassassin as ubuntu package, and if so,
> remove one of them...
You were correct Matus, it was apparently added when I did the initial
install last weekend. I removed it and installed from CPAN. However,
File::Scan::ClamAV will still not install, output is here -
http://pastebin.com/7B0bNFps  one additional note, the Ubuntu pkg
maintainer for Clam said it was easier if I installed from his pkg
rather than from source (I've always installed from source). Should I
remove the pkg and install from source and see what happens?

Thank you
Chris





Re: SA and Ubuntu 14.04 LTS

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>> > On Wed, 2014-07-16 at 01:50 -0700, Ian Zimmerman wrote:
>> >> There _is_ something wrong with his environment: he's running
>> >> Ubuntu. :-)

>On Wed, 2014-07-16 at 18:40 -0500, Jonathan Nichols wrote:
>> But a serious question that I haven’t seen asked yet - how did you
>> install Spamassasin?  They’re usually pretty good about keeping the
>> current version in the apt repository.  Did you do it from there or by
>> hand?  I’m wondering if there’s a mix here somewhere.  :-)

On 16.07.14 19:36, Chris wrote:
>installed via CPAN as I always have

yes, that's why we have package distributions, to install packages in a
semi-manual way.

first check if you have installed spamassassin as ubuntu package, and if so,
remove one of them...
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Quantum mechanics: The dreams stuff is made of. 

Re: SA and Ubuntu 14.04 LTS

Posted by Chris <cp...@embarqmail.com>.
On Wed, 2014-07-16 at 18:40 -0500, Jonathan Nichols wrote:
> On Jul 16, 2014, at 7:31 AM, Chris <cp...@embarqmail.com> wrote:
> 
> > On Wed, 2014-07-16 at 01:50 -0700, Ian Zimmerman wrote:
> >> On Wed, 16 Jul 2014 06:09:08 +0200
> >> Karsten Bräckelmann <gu...@rudersport.de> wrote:
> >> 
> >>> And to really include *local* plugins, provide a relative path (to the
> >>> current site-wide configuration dir, without a leading slash) as
> >>> optional second argument to the loadplugin statement. There's hardly
> >>> ever any need for a full absolute path. And if there is, there's
> >>> something wrong with your environment.
> >> 
> >> There _is_ something wrong with his environment: he's running
> >> Ubuntu. :-)
> >> 
> >> Sorry, couldn't resist.
> >> 
> > At least I'm not running an old Mandriva anymore Ian, but then again
> > that was working. :-)
> > 
> 
> *groans*
> 
> But a serious question that I haven’t seen asked yet - how did you install Spamassasin? They’re usually pretty good about keeping the current version in the apt repository. Did you do it from there or by hand? I’m wondering if there’s a mix here somewhere. :-)
> 
> 
installed via CPAN as I always have



Re: SA and Ubuntu 14.04 LTS

Posted by Jonathan Nichols <jn...@pbp.net>.
On Jul 16, 2014, at 7:31 AM, Chris <cp...@embarqmail.com> wrote:

> On Wed, 2014-07-16 at 01:50 -0700, Ian Zimmerman wrote:
>> On Wed, 16 Jul 2014 06:09:08 +0200
>> Karsten Bräckelmann <gu...@rudersport.de> wrote:
>> 
>>> And to really include *local* plugins, provide a relative path (to the
>>> current site-wide configuration dir, without a leading slash) as
>>> optional second argument to the loadplugin statement. There's hardly
>>> ever any need for a full absolute path. And if there is, there's
>>> something wrong with your environment.
>> 
>> There _is_ something wrong with his environment: he's running
>> Ubuntu. :-)
>> 
>> Sorry, couldn't resist.
>> 
> At least I'm not running an old Mandriva anymore Ian, but then again
> that was working. :-)
> 

*groans*

But a serious question that I haven’t seen asked yet - how did you install Spamassasin? They’re usually pretty good about keeping the current version in the apt repository. Did you do it from there or by hand? I’m wondering if there’s a mix here somewhere. :-)



Re: SA and Ubuntu 14.04 LTS

Posted by Chris <cp...@embarqmail.com>.
On Wed, 2014-07-16 at 01:50 -0700, Ian Zimmerman wrote:
> On Wed, 16 Jul 2014 06:09:08 +0200
> Karsten Bräckelmann <gu...@rudersport.de> wrote:
> 
> > And to really include *local* plugins, provide a relative path (to the
> > current site-wide configuration dir, without a leading slash) as
> > optional second argument to the loadplugin statement. There's hardly
> > ever any need for a full absolute path. And if there is, there's
> > something wrong with your environment.
> 
> There _is_ something wrong with his environment: he's running
> Ubuntu. :-)
> 
> Sorry, couldn't resist.
> 
At least I'm not running an old Mandriva anymore Ian, but then again
that was working. :-)


Re: SA and Ubuntu 14.04 LTS

Posted by Ian Zimmerman <it...@buug.org>.
On Wed, 16 Jul 2014 06:09:08 +0200
Karsten Bräckelmann <gu...@rudersport.de> wrote:

> And to really include *local* plugins, provide a relative path (to the
> current site-wide configuration dir, without a leading slash) as
> optional second argument to the loadplugin statement. There's hardly
> ever any need for a full absolute path. And if there is, there's
> something wrong with your environment.

There _is_ something wrong with his environment: he's running
Ubuntu. :-)

Sorry, couldn't resist.

-- 
Please *no* private copies of mailing list or newsgroup messages.

Re: SA and Ubuntu 14.04 LTS

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2014-07-15 at 22:34 -0500, Chris wrote:
> On Wed, 2014-07-16 at 04:26 +0200, Karsten Bräckelmann wrote:
> > On Tue, 2014-07-15 at 00:11 -0500, Chris wrote:
> > > dbg: plugin: loading Mail::SpamAssassin::Plugin::DCC
> > > from /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm
> > 
> > Debug states loading a plugin from "an explicitly given absolute
> > referenced file name", rather than resolving from @INC (in which case
> > there literally would be reported "from @INC").
> > 
> > > warn: plugin: failed to parse plugin /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm:
> > > Can't locate /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm
> > > in @INC (you may need to install ...) (@INC contains: ...) at ...
> > 
> > Lint states the same. The explicitly given absolute referenced Perl
> > module cannot be parsed. Because it cannot be located.
> > 
> > The module unable to be located being prefixed with a full, absolute
> > path is another hint. Stock SA loadplugin lines are not absolute, but
> > relative.

> You were right (as I knew you would be) I had a path pointing to an old path
> changed to the correct path and it worked fine.

While that might work now (just like it worked before), don't do that.
"That" being giving absolute paths in the config.

Do NOT give the optional path/to/plugin.pm, unless you REALLY DO need
it. In particular, do not add an explicit path, if you want to use the
Perl module provided by your distro.

And to really include *local* plugins, provide a relative path (to the
current site-wide configuration dir, without a leading slash) as
optional second argument to the loadplugin statement. There's hardly
ever any need for a full absolute path. And if there is, there's
something wrong with your environment.


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


Re: SA and Ubuntu 14.04 LTS

Posted by Chris <cp...@embarqmail.com>.
On Wed, 2014-07-16 at 04:26 +0200, Karsten Bräckelmann wrote:
> On Tue, 2014-07-15 at 00:11 -0500, Chris wrote:
> > dbg: plugin: loading Mail::SpamAssassin::Plugin::DCC
> > from /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm
> 
> Debug states loading a plugin from "an explicitly given absolute
> referenced file name", rather than resolving from @INC (in which case
> there literally would be reported "from @INC").
> 
> > warn: plugin: failed to parse plugin /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm:
> > Can't locate /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm
> > in @INC (you may need to install ...) (@INC contains: ...) at ...
> 
> Lint states the same. The explicitly given absolute referenced Perl
> module cannot be parsed. Because it cannot be located.
> 
> The module unable to be located being prefixed with a full, absolute
> path is another hint. Stock SA loadplugin lines are not absolute, but
> relative.
> 
> 
> The SA stock site configuration regarding DCC is in v310.pre, commented
> out by default.
> 
>   #loadplugin Mail::SpamAssassin::Plugin::DCC
> 
> To enable DCC, un-comment, or add that option to a local .pre file.
> 
> 
> What you have in your .pre (or .cf) site configuration is a custom
> loadplugin option, with the perl module's path hardcoded.
> 
>   loadplugin Mail::SpamAssassin::Plugin::DCC /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm
> 
> The path is optional, and should only be given if absolutely necessary.
> It certainly is not necessary with stock SA plugins. It isn't necessary
> either with any plugin included in Perl @INC.
> 
> To find and correct this issue, grep in your site config dir:
> 
>   grep DCC *.pre *.cf
> 
> To find this and more similar issues:
> 
>   grep /usr/lib *.pre *.cf
> 
> 
> > warn: plugin: failed to parse plugin /etc/spamassassin/clamav.pm:
> > Can't locate File/Scan/ClamAV.pm in @INC ...
> 
> This is a relative path. You didn't install F::S::ClamAV after setting
> up the new system.
> 
> 
> > Any advice/assistance would be appreciated.
> 
> Glad to help.
> 
> Though grepping through your site config might have helped. Or carefully
> revisiting the config inherited from an other (and older) system.
> 
You were right (as I knew you would be) I had a path pointing to an old path
changed to the correct path and it worked fine. As far as
File::Scan::ClamAV I've tried to install it several times and always get
the same out put - http://pastebin.com/yDydeFwF 

Thanks for the reply
Chris




Re: SA and Ubuntu 14.04 LTS

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2014-07-15 at 00:11 -0500, Chris wrote:
> dbg: plugin: loading Mail::SpamAssassin::Plugin::DCC
> from /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm

Debug states loading a plugin from "an explicitly given absolute
referenced file name", rather than resolving from @INC (in which case
there literally would be reported "from @INC").

> warn: plugin: failed to parse plugin /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm:
> Can't locate /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm
> in @INC (you may need to install ...) (@INC contains: ...) at ...

Lint states the same. The explicitly given absolute referenced Perl
module cannot be parsed. Because it cannot be located.

The module unable to be located being prefixed with a full, absolute
path is another hint. Stock SA loadplugin lines are not absolute, but
relative.


The SA stock site configuration regarding DCC is in v310.pre, commented
out by default.

  #loadplugin Mail::SpamAssassin::Plugin::DCC

To enable DCC, un-comment, or add that option to a local .pre file.


What you have in your .pre (or .cf) site configuration is a custom
loadplugin option, with the perl module's path hardcoded.

  loadplugin Mail::SpamAssassin::Plugin::DCC /usr/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Plugin/DCC.pm

The path is optional, and should only be given if absolutely necessary.
It certainly is not necessary with stock SA plugins. It isn't necessary
either with any plugin included in Perl @INC.

To find and correct this issue, grep in your site config dir:

  grep DCC *.pre *.cf

To find this and more similar issues:

  grep /usr/lib *.pre *.cf


> warn: plugin: failed to parse plugin /etc/spamassassin/clamav.pm:
> Can't locate File/Scan/ClamAV.pm in @INC ...

This is a relative path. You didn't install F::S::ClamAV after setting
up the new system.


> Any advice/assistance would be appreciated.

Glad to help.

Though grepping through your site config might have helped. Or carefully
revisiting the config inherited from an other (and older) system.


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}