If I try as "root" (but the readyexec service was launched by "spamc"),
then I get:

[24384] dbg: pyzor: network tests on, attempting Pyzor
[24384] dbg: pyzor: pyzor is available: /usr/local/bin/readyexec
[24384] dbg: pyzor: opening pipe: /usr/local/bin/readyexec /tmp/pyzor
check < /tmp/.spamassassin24384QlgyvMtmp
[24384] dbg: pyzor: [24389] finished: exit=0x0100
[24384] dbg: pyzor: got response: downloading servers from
http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x
[24384] dbg: pyzor: failure to parse response "downloading servers from
http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x";

If I try as "spamc", then I get:

[24756] dbg: pyzor: network tests on, attempting Pyzor
[24756] dbg: pyzor: pyzor is available: /usr/local/bin/readyexec
[24756] dbg: pyzor: opening pipe: /usr/local/bin/readyexec /tmp/pyzor
check < /tmp/.spamassassin24756qBws8Rtmp
[24756] dbg: pyzor: got response: 82.94.255.100:24441 (200, 'OK') 5 0
[24756] dbg: pyzor: listed: COUNT=5/5 WHITELIST=0

Keep in mind, I'm running on Linux (Debian Sarge - Untangle) and am
using Python 2.3... So there may be some differences there.

- Jason

-----Original Message-----
From: neil [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 01, 2008 11:00 AM
To: Jason J. Ellingson
Cc: users@spamassassin.apache.org
Subject: Re: Using Pzyor with high volume

Hi;

>Since you are running the "server" portion as "nobody"... Then the
spamd
>user account needs to stay as "nobody".

We run SA as a system filter, so no calls to multiple different users.

root      20203  4.8  5.4 61144 56424  ??  S     4:11PM   2:41.23 spamd
child (perl5.8.8)
nobody    21508  4.1  5.6 62920 58388  ??  S     4:13PM   2:27.77 spamd
child (perl5.8.8)

If I run it as root, it stops the error, but then it stop hitting
things.
Though with -D it does show that it is talking to the pyzor server via
the pipe.
(Note: I deleted the 66.250.40.33 from the pyzor servers list, but it is
still showing up, even after a spamd restart.)

# spamassassin -D pyzor < /tmp/spam.txt
[42041] dbg: pyzor: network tests on, attempting Pyzor
[42041] dbg: pyzor: pyzor is available: /usr/local/bin/readyexec
[42041] dbg: pyzor: opening pipe: /usr/local/bin/readyexec /tmp/pyzor1
check < /tmp/.spamassassin420412jN0S2tmp
[42041] dbg: pyzor: [42060] finished: exit=0x0100
[42041] dbg: pyzor: got response: 82.94.255.100:24441 (200, 'OK') 0
0\n66.250.40.33:24441 TimeoutError:
[42041] dbg: pyzor: failure to parse response "66.250.40.33:24441
TimeoutError: "

I'm off for a few days, so I'll have a play with it when I get back. I
think, as you pointed out, it could be to do with permissions. Cheers
for that.

Rgds
n





Jason J. Ellingson wrote:
> Since you are running the "server" portion as "nobody"... Then the
spamd
> user account needs to stay as "nobody".  If you make a spamc call with
a
> "user" identified, then spamd will switch to that user account before
> processing the message (this is for user specific needs like custom
user
> rules, BAYES, AWL, etc).  Since the accounts now don't match, it'll
give
> you that error.
>
> - Jason
>
> -----Original Message-----
> From: neil [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 01, 2008 9:31 AM
> To: Jason J. Ellingson
> Cc: Ben Poliakoff; Robert Blayzor; users@spamassassin.apache.org
> Subject: Re: Using Pzyor with high volume
>
> Hi;
>   I have it running and it works, load is down and free mem up, but
not 
> certain if that is just because I've restarted spamd a few times. I'm 
> getting some weird error messages has anyone else seen this?
>
> I had to modify the make file
> #PYTHON=python2
> PYTHON=python2.5
>
> Then run the install manually
> /usr/local/bin/python2.5 setup.py install
> And cp readyexec /usr/local/bin
>
> Finally I kicked it off with
> /usr/local/bin/sudo -u nobody readyexecd.py /tmp/pyzor1
pyzor.client.run
> &
>
> local.cf
> pyzor_path /usr/local/bin/readyexec
> pyzor_options /tmp/pyzor1
>
> I'm getting pyzor hits in the logs so all appears to be working, but
the
>
> following are occasionally appearing on the terminal I started it
from.
> FreeBSD 6.2 by the way.
>
>
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.5/site-packages/readyexec.py", line
385, 
> in process_request
>     self.finish_request(request, address)
>   File "/usr/local/lib/python2.5/site-packages/readyexec.py", line
408, 
> in finish_request
>     super(ReadyExec, self).finish_request(request, address)
>   File "/usr/local/lib/python2.5/SocketServer.py", line 254, in 
> finish_request
>     self.RequestHandlerClass(request, client_address, self)
>   File "/usr/local/lib/python2.5/site-packages/readyexec.py", line
173, 
> in __init__
>     client_address, server)
>   File "/usr/local/lib/python2.5/SocketServer.py", line 522, in
__init__
>     self.handle()
>   File "/usr/local/lib/python2.5/site-packages/readyexec.py", line
187, 
> in handle
>     self.handle_conduit()
>   File "/usr/local/lib/python2.5/site-packages/readyexec.py", line
209, 
> in handle_conduit
>     self.tell_exit(os.waitpid(pid, 0)[1] >> 8)
>   File "/usr/local/lib/python2.5/site-packages/readyexec.py", line
293, 
> in tell_exit
>     self.send_string("exit")
>   File "/usr/local/lib/python2.5/site-packages/readyexec.py", line
298, 
> in send_string
>     self.wfile.write(netstring(msg))
>   File "/usr/local/lib/python2.5/socket.py", line 262, in write
>     self.flush()
>   File "/usr/local/lib/python2.5/socket.py", line 249, in flush
>     self._sock.sendall(buffer)
> error: (32, 'Broken pipe')
>
>
> rgds
> n
>
>
>
>
> Jason J. Ellingson wrote:
>   
>> Solved the problem.
>>
>> readyexec is *USER* specific.  You *MUST* launch the readyexecd.py
>> "server" part as the SAME user as the user of readyexec "client".
>>
>> My spamd service is run as a user "spamc", while I was adding the
>> service as "root".
>>
>> Now, that I have the service running as "spamc", we have success!
>>
>> Thanks for your help folks!
>>
>> - Jason
>>
>> -----Original Message-----
>> From: Jason J. Ellingson [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, April 30, 2008 3:21 PM
>> To: Ben Poliakoff
>> Cc: Robert Blayzor; users@spamassassin.apache.org
>> Subject: RE: Using Pzyor with high volume
>>
>> I am trying those settings, yet I get no Pyzor hits.
>>
>> I can manually do a "readyexec /tmp/pyzor ping" which works fine...
>>
>> Any other suggestions?
>>
>> Many thanks!
>>
>> - Jason
>>
>> -----Original Message-----
>> From: Ben Poliakoff [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, April 30, 2008 1:23 PM
>> To: Jason J. Ellingson
>> Cc: Robert Blayzor; users@spamassassin.apache.org
>> Subject: Re: Using Pzyor with high volume
>>
>> * Jason J. Ellingson <[EMAIL PROTECTED]> [20080430 11:07]:
>>   
>>     
>>> Yup... I got the "server" portion running... The trick now is to get
>>> SpamAssassin to use "readyexec /tmp/pyzor" instead of just
"pyzor"...
>>> Any suggestions?  I was looking at modifying Pyzor.pm in the
>>> SpamAssassin perl directory.
>>>     
>>>       
>> Something like this seems to work for me:
>>
>>     use_pyzor 1
>>     pyzor_path /usr/local/bin/readyexec
>>     pyzor_options /tmp/pyzor
>>
>> Ben
>>
>>   
>>     
>
>
>   

Reply via email to