You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2005/11/09 21:50:52 UTC

Re: Can't locate object method

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Jeffrey Duncan writes:
> Hello.  I am getting the following in my logs and wonder if anyone can 
> help with the problem:
> 
> Nov  9 12:56:01 server spamd[1845]: Failed to run 
> __ENV_AND_HDR_FROM_MATCH SpamAssassin test, skipping:__(Can't locate 
> object method "check_for_matching_env_and_hdr_from" via package 
> "Mail::SpamAssassin::PerMsgStatus" at 
> /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAss
> assin/PerMsgStatus.pm line 2312, <GEN3> line 144._)
> 
> Nov  9 12:56:01 server spamd[1845]: Failed to run USER_IN_DEF_SPF_WL 
> SpamAssassin test, skipping:__(Can't locate object method "chec
> k_for_def_spf_whitelist_from" via package 
> "Mail::SpamAssassin::PerMsgStatus" at 
> /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Per
> MsgStatus.pm line 2312, <GEN3> line 144._)
> 
> Nov  9 12:56:01 server spamd[1845]: Failed to run USER_IN_SPF_WHITELIST 
> SpamAssassin test, skipping:__(Can't locate object method "c
> heck_for_spf_whitelist_from" via package 
> "Mail::SpamAssassin::PerMsgStatus" at 
> /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/PerM
> sgStatus.pm line 2312, <GEN3> line 144._)
> 
> Version is : SpamAssassin version 3.0.2 running on Perl version 5.8.6
> I am using Fedora Core 4 and qmail
> 
> I have search for days on this and can't seem to find what's wrong.  Any 
> help would be greatly appreciated!

Run "locate spamd", "locate PerMsgStatus.pm", and resolve the two.  there
should only be one set of SpamAssassin perl modules in your system, and
this almost definitely is not the case, as it's picking up modules that do
not match the rules.

- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFDcmEsMJF5cimLx9ARAkDKAJ9FVZuWLhicYL4VH0sd/KSQDzWgdgCfdbkz
jje1pi73zTGyMEthQEBmELg=
=TKzI
-----END PGP SIGNATURE-----


Re: Can't locate object method

Posted by Matt Kettler <mk...@evi-inc.com>.
Jeffrey Duncan wrote:
> Thanks!  Do I need to remove the 5.8.5 and 5.8.6 perl libraries too?

The Mail/SpamAssassin ones, yes.. everything else, no.

Re: Can't locate object method

Posted by Matt Kettler <mk...@evi-inc.com>.
Jeffrey Duncan wrote:
> Thanks,
> 
>>>From my mail headers I think I am running 3.0.2 - also,
> 
> spamc -V
> SpamAssassin Client version 3.0.2
> 
> I think what happened is that I did a yum update and it broke things.  I
> tried to rename the 5.8.5 PerMsgStatus and spamd didn't load.  I thinik
> I have some mix ups here.  Should I uninstall SA and start from
> scratch? 

Probably...

> COuld you give me a few pointers on how to get rid of it
> gracefully?
> 

I'd first try to use "yum remove". At least this will gracefully remove as much
as yum understands.

After that I'd check and see if rpm -qa thinks there's still some kind of SA
package installed and I'd rpm -e any that are left over.

>From there, do an updatedb and locate to see what's left over that couldn't be
removed by your package manager and wipe the leftovers out with rm. While this
might sound un-graceful, it's pretty much all you've got.

Suggested locate searches:
locate spamassassin
locate spamc
locate spamd
locate sa-learn
locate SpamAssassin

Make sure you hit pretty much everything in /usr. (ie: /usr/share/spamassassin/,
/usr/lib/perl5/site_perl/*/SpamAssassin, /usr/bin/, /usr/local/bin, etc.)


After you've cleaned out all the SA residue, then try to re-install SA.



Re: Can't locate object method

Posted by Matt Kettler <mk...@evi-inc.com>.
Jeffrey Duncan wrote:
> Okay, so I see that I have two versions of PerMsgStatus.pm (below)
> 
> How do I remove one of them to get rid of the issues?
> 
> Jeffrey Duncan wrote:
> 
>> Thanks, 
>>
>> What do you mean resolve?  Here is the output ...
>>
>>  
>> [root@server log]# locate PerMsgStatus.pm
>> /usr/lib/perl5/site_perl/5.8.6/Mail/SpamAssassin/PerMsgStatus.pm
>> /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/PerMsgStatus.pm
>> /usr/src/redhat/BUILD/Mail-SpamAssassin-3.1.0/lib/Mail/SpamAssassin/PerMsgStatus.pm
>> /usr/src/redhat/BUILD/Mail-SpamAssassin-3.1.0/blib/lib/Mail/SpamAssassin/PerMsgStatus.pm
>> /downloads/qmailrocks/perlmods/rpms/newmods/Mail-SpamAssassin-3.1.0/lib/Mail/SpamAssassin/PerMsgStatus.pm
>> /downloads/qmailrocks/perlmods/rpms/newmods/Mail-SpamAssassin-3.1.0/blib/lib/Mail/SpamAssassin/PerMsgStatus.pm


I'd assume you installed an older version of SA while you were using perl 5.8.5.
Later you upgraded to 5.8.6 and then installed 3.1.0 sometime afterward.

The 3.1.0 installation did not see the outdated site_perl directory, thus never
removed it.

I'd suggest blowing away the old copy entirely with rm -rf:

rm -rf /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/

then try your SA. If that doesn't fix things, rm -rf both of them and re-install
SA 3.1.0.


While you're at it double-check for duplicate spamd and spamc scripts. That's
less likely but it is possible that one is in /usr/bin and another is in
/usr/local/bin..