Bug 805 - Razor2 lookups don't work
Summary: Razor2 lookups don't work
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 2.40CVS
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-02 14:01 UTC by Theo Van Dinter
Modified: 2002-09-03 22:19 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Theo Van Dinter 2002-09-02 14:01:32 UTC
Sep  2 16:57:30 eclectic sendmail[27562]: g82KvT627562:
from=<s5-return-1-spamtrapuser=kluge.net@mail.imprintsdirect.com>, size=919,
class=-60, nrcpts=1, msgid=<20020902195614.28823.qmail@mail.imprintsdirect.com>,
proto=SMTP, daemon=MTA, relay=[67.104.186.133]
Sep  2 16:57:30 eclectic spamd[26425]: connection from localhost [ 127.0.0.1 ]
at port 36640
Sep  2 16:57:30 eclectic spamd[27567]: info: setuid to felicity succeeded
Sep  2 16:57:30 eclectic spamd[27567]: processing message
<20020902195614.28823.qmail@mail.imprintsdirect.com> for felicity:501, expecting
1253 bytes.
Sep  2 16:57:30 eclectic spamd[27567]: razor2 check skipped: No such file or
directory Can't call method "log" on unblessed reference at
/usr/lib/perl5/site_perl/5.6.1/Razor2/Client/Agent.pm line 211, <STDIN> line 55.
Sep  2 16:57:30 eclectic spamd[27567]: clean message (3.6/5.0) for felicity:501
in   0 seconds, 1253 bytes.
Sep  2 16:57:30 eclectic sendmail[27563]: g82KvT627562: to=felicity+spamtrap,
delay=00:00:00, xdelay=00:00:00, mailer=local, pri=138310, relay=spamtrap,
dsn=2.0.0, stat=Sent



I haven't figured out why this happens yet.  If I have time, I'll look into it,
but for right now I disable Razor2 checks via "score RAZOR2_CHECK 0".
Comment 1 Theo Van Dinter 2002-09-02 15:05:38 UTC
from the sa-dev mailing list:

"ln -s /dev/null ~root/.razor/razor-agent.log"
  
The question is, why does 2.40 do this whereas my 2.31 doesn't. Hmmm.
Comment 2 Justin Mason 2002-09-03 11:00:28 UTC
er, followup mail sent to -talk ;)
Comment 3 Theo Van Dinter 2002-09-03 11:25:30 UTC
A quick debugging seems to show that spamd only creates a Razor2 object once,
which sets variables to be root's variables (or a -u user likely):  (from Razor)

open(T,">>/tmp/foo"); print T
scalar(localtime),",$<,$>,$self->{opt}->{config},$logto\n"; close(T);

Tue Sep  3 14:03:30 2002,0,0,,file:/root/.razor/razor-agent.log


This only occurs once when starting spamd.

The question is: do we desire this behavior since each user may want to
configure their own Razor?  or should we assume if they run spam[cd] that they
use a system configuration?
Comment 4 Justin Mason 2002-09-03 12:02:37 UTC
nope, we don't do that.  However, razor itself may use a singleton for
configuration, which would indeed display that behaviour.  so option (b)
(config for each spamc -u user) may not be a goer due to this anyway...
Comment 5 Theo Van Dinter 2002-09-03 12:04:25 UTC
Subject: Re:  Razor2 lookups don't work

On Tue, Sep 03, 2002 at 12:02:37PM -0700, bugzilla-daemon@hughes-family.org wrote:
> nope, we don't do that.  However, razor itself may use a singleton for
> configuration, which would indeed display that behaviour.  so option (b)
> (config for each spamc -u user) may not be a goer due to this anyway...

I'm certain it's SA's doing since I can put the same debug statement in
the appropriate Dns.pm area and I still only get one line of output.

Comment 6 Theo Van Dinter 2002-09-03 13:59:56 UTC
Subject: Re: [SAdev]  Razor2 lookups don't work

On Tue, Sep 03, 2002 at 12:04:25PM -0700, bugzilla-daemon@hughes-family.org wrote:
> I'm certain it's SA's doing since I can put the same debug statement in
> the appropriate Dns.pm area and I still only get one line of output.

byproduct of my debug method... :(

some more debugging shows that the problem is actually that $ENV{'HOME'}
doesn't get changed to the user's home directory and stays the default
root homedir.  That makes more sense than the original thought.  Phew!

Comment 7 Justin Mason 2002-09-04 06:19:39 UTC
closing, since the cause has now been discovered and reopened as a separate
bug