You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@issues.apache.org on 2011/03/25 20:58:37 UTC

[Bug 6563] New: Plugin::Pyzor regexp seems wrong, always fails to parse response

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6563

           Summary: Plugin::Pyzor regexp seems wrong, always fails to
                    parse response
           Product: Spamassassin
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Plugins
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: hedges@scriptdolphin.org


When running the learn process, pyzor fails.

It seems to work fine when I try it from the command line using any regular
user or the user spamd runs as:

$ pyzor -d check < /tmp/lame.mbox
downloading servers from
http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x
sending: 'User: anonymous\nTime: 1301081371\nSig:
132e5b269db9b775042342f556f5e47266069654\n\nOp: check\nOp-Digest:
cd6a09de5a158d25ae24e9ae6c16cc2edd3a6bf2\nThread: 26287\nPV: 2.0\n\n'
received: 'Thread: 26287\nCount: 0\nWL-Count: 0\nCode: 200\nDiag: OK\nPV:
2.0\n\n'
public.pyzor.org:24441  (200, 'OK') 0   0

But when I run SA with debug, this is the log:

[18638] dbg: pyzor: pyzor is available: /usr/bin/pyzor
[18638] dbg: info: entering helper-app run mode
[18638] dbg: pyzor: opening pipe: /usr/bin/pyzor -d check <
/tmp/.spamassassin18638iSKXO7tmp
[18645] dbg: util: setuid: ruid=502 euid=502
[18638] dbg: pyzor: [18645] finished: exit=0x0100
[18638] dbg: pyzor: got response: sending: 'User: anonymous\nTime:
1301081098\nSig: 955d57948e28759729e7f55df027eb5875e7a323\n\nOp:
check\nOp-Digest: d4799b6635caaa20305ac45f068d8763c9c86cae\nThread: 65054\nPV:
2.0\n\n'\nreceived: 'Thread: 65054\nCount: 0\nWL-Count: 0\nCode: 200\nDiag:
OK\nPV: 2.0\n\n'\npublic.pyzor.org:24441 (200, 'OK') 0 0
[18638] dbg: info: leaving helper-app run mode
[18638] dbg: pyzor: failure to parse response "sending: 'User: anonymous\nTime:
1301081098\nSig: 955d57948e28759729e7f55df027eb5875e7a323\n\nOp:
check\nOp-Digest: d4799b6635caaa20305ac45f068d8763c9c86cae\nThread: 65054\nPV:
2.0\n\n'"
[18638] dbg: pyzor: failure to parse response "received: 'Thread: 65054\nCount:
0\nWL-Count: 0\nCode: 200\nDiag: OK\nPV: 2.0\n\n'"

The regexp in Mail::SpamAssassin::Plugin::Pyzor doesn't make sense to me:

  if ($one_response =~ /^\S+\t.*?\t(\d+)\t(\d+)\s*$/) {

... there are no tabs in the output from the pyzor server.  It seems like it
will never match.  Which means pyzor doesn't work at all for anyone anymore.

Is this just due to a pyzor response format change that no one noticed?

--mark--

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6563] Plugin::Pyzor regexp seems wrong, always fails to parse response

Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6563

--- Comment #2 from Mark Martinec <Ma...@ijs.si> 2011-03-25 16:26:37 EDT ---
$ pyzor discover

  (as user normally running SpamAssassin)

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6563] Plugin::Pyzor regexp seems wrong, always fails to parse response

Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6563

Mark Hedges <he...@scriptdolphin.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |INVALID

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6563] Plugin::Pyzor regexp seems wrong, always fails to parse response

Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6563

Mark Hedges <he...@scriptdolphin.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |hedges@scriptdolphin.org
         Resolution|                            |FIXED

--- Comment #3 from Mark Hedges <he...@scriptdolphin.org> 2011-03-25 16:51:27 EDT ---
I'm not sure this has anything to do with debugging output.  But it looks like
those lines aren't supposed to be parsed anyway:

$ cat /tmp/lame.mbox | pyzor -d --homedir $PYDIR check
sending: 'User: anonymous\nTime: 1301085808\nSig:
18631806f38c35a0b6a601f26d90d4b0a2e8a014\n\nOp: check\nOp-Digest:
cd6a09de5a158d25ae24e9ae6c16cc2edd3a6bf2\nThread: 1465\nPV: 2.0\n\n'
received: 'Thread: 1465\nCount: 0\nWL-Count: 0\nCode: 200\nDiag: OK\nPV:
2.0\n\n'
public.pyzor.org:24441    (200, 'OK')    0    0


Re discovering the server, yes, I already ran that:

$ pyzor -d --homedir $PYDIR discover
downloading servers from
http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x
$ cat $PYDIR/servers 
public.pyzor.org:24441


Aha.  With `od -a` I see the last line is the one it cares about:

public.pyzor.org:24441    (200, 'OK')    0    0

That does have tabs and does match.

However, debugging doesn't give any indication that it worked or not, parsing
the last line.  Maybe it did work and these are just warnings, and the response
was '0' for whitelisted and count so it just stopped processing.

I guess this isn't really a bug, just a lack of debug information.  Sorry.

--mark--

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6563] Plugin::Pyzor regexp seems wrong, always fails to parse response

Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6563

--- Comment #1 from Karsten Bräckelmann <gu...@rudersport.de> 2011-03-25 16:26:09 EDT ---
(In reply to comment #0)
> The regexp in Mail::SpamAssassin::Plugin::Pyzor doesn't make sense to me:

> ... there are no tabs in the output from the pyzor server.  It seems like it
> will never match.  Which means pyzor doesn't work at all for anyone anymore.

Logger.pm log_message() substitutes tabs for spaces in that dbg() output.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.