On Sat, 2012-10-06 at 10:51 -0700, John Hardin wrote:
> On Sat, 6 Oct 2012, Arthur Dent wrote:
> 
> > On Sat, 2012-10-06 at 09:01 -0700, John Hardin wrote:
> >> On Sat, 6 Oct 2012, Arthur Dent wrote:
> >>>
> >>> OK - I don't know what the output means though!...
> >>> ============================8<=======================================
> >>> $ pyzor -d --homedir /home/mark/.pyzor check < spam1.txt
> >>>
> >>> sending: 'User: anonymous\nTime: 1349530888\nSig: 
> >>> 011dffafd6c01568e1ebdc453bf9feae2bb000e9\n\nOp: check\nOp-Digest: 
> >>> 6da5a18b2eda6b5db73a8747932e84436d653cd5\nThread: 31045\nPV: 2.0\n\n'
> >>> received: 'Code: 200\nDiag: OK\nPV: 2.1\nThread: 31045\nCount: 
> >>> 0\nWL-Count: 0\n\n'
> >>> public.pyzor.org:24441    (200, 'OK')     0       0
> >>> ============================8<=======================================
> >>
> >> Immediately after running the above command interactively, run "echo $?"
> >> to report the exit code it returned:
> >>
> >>    pyzor -d --homedir /home/mark/.pyzor check < spam1.txt ; echo $?
> >
> > $ pyzor -d --homedir /home/mark/.pyzor check < spam1.txt ; echo $?
> > sending: 'User: anonymous\nTime: 1349543386\nSig: 
> > c44c64b14afb3cdbf522bde672d087d8c8109101\n\nOp: check\nOp-Digest: 
> > 6da5a18b2eda6b5db73a8747932e84436d653cd5\nThread: 25600\nPV: 2.0\n\n'
> > received: 'Code: 200\nDiag: OK\nPV: 2.1\nThread: 25600\nCount: 0\nWL-Count: 
> > 0\n\n'
> > public.pyzor.org:24441      (200, 'OK')     0       0
> > 1
> >
> > Does that tell you anything?
> 
> I was assuming a nonzero exit code indicated an error, but Pyzor doesn't 
> follow that convention.
> 
> The "dbg: pyzor: check failed: no response" means that for some reason the 
> Pyzor SA plugin couldn't read the output that the pyzor program is 
> generating. But a different error message should have been generated if 
> that was happening.
> 
> I can add some more debugging output statements if you're willing to 
> temporarily try some modified code.
> 

Hi John,

I'm happy to try anything - especially if it helps to refine open source
software. However, before we go down that route can we just check that
it is not my lack of knowledge that is the problem here.

To test pyzor I ran the command suggested on the Wiki [1]:
echo "test" | spamassassin -D pyzor 2>&1 | less

This, it seems to me, just pipes the word test into SA and looks at the
pyzor output.

Wondering if that was the problem I tried this:
cat spam1.txt | spamassassin -D pyzor 2>&1 | less
where spam1.txt is a real email (spammy - but I don't know if it should
trigger pyzor or not).

Both tests give the exit code 1. However, the first one produces a
"failed: no response" message, whereas the second one produces a "got
response" message. Viz:

$ echo "test" | spamassassin -D pyzor 2>&1 | less
Oct  6 19:33:01.540 [14853] dbg: pyzor: network tests on, attempting Pyzor
Oct  6 19:33:05.329 [14853] dbg: pyzor: pyzor is available: /bin/pyzor
Oct  6 19:33:05.335 [14853] dbg: pyzor: opening pipe: /bin/pyzor --homedir 
/home/mark/.pyzor check < /tmp/.spamassassin14853Tu0tM9tmp
Oct  6 19:33:05.495 [14853] dbg: pyzor: [14860] finished: exit 1
Oct  6 19:33:05.496 [14853] dbg: pyzor: check failed: no response

$ cat spam1.txt | spamassassin -D pyzor 2>&1 | less
Oct  6 19:34:05.896 [14864] dbg: pyzor: network tests on, attempting Pyzor
Oct  6 19:34:10.940 [14864] dbg: pyzor: pyzor is available: /bin/pyzor
Oct  6 19:34:10.942 [14864] dbg: pyzor: opening pipe: /bin/pyzor --homedir 
/home/mark/.pyzor check < /tmp/.spamassassin14864qX2Rmwtmp
Oct  6 19:34:11.248 [14864] dbg: pyzor: [14866] finished: exit 1
Oct  6 19:34:11.248 [14864] dbg: pyzor: got response: public.pyzor.org:24441 
(200, 'OK') 0 0

Is it simply that neither "input" (the word "test" or a real email)
happen to trigger pyzor?

Anyway - I'm happy to be guided by someone with more knowledge than me
(which is not difficult!).

Thanks again...

Mark
[1] http://wiki.apache.org/spamassassin/UsingPyzor

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to