[Spambayes] pop3proxy - a couple issues
Skip Montanaro
skip at pobox.com
Tue Jan 14 15:55:48 EST 2003
I am just trying out pop3proxy for the first time with ssh (having pop3proxy
start an ssh session that forwards the pop connection) and ran into a couple
problems. I don't think they are related to my use of an ssh tunnel, and
I'm not about to test pop3proxy without ssh and have my password go over the
net in the clear (though I will mess about with manually starting ssh
external to pop3proxy shortly).
Messages get sucked over the pipe and properly classified, however I have
two problems:
* No X-Hammie-Debug headers are added to the processed messages even
though I have
[Hammie]
hammie_debug_header: True
in my options file and have BAYESCUSTOMIZE set to
BAYESCUSTOMIZE=$HOME/hammie.opt
* When I click the "review" button in my web browser I get a max
recursion depth exception from pop3proxy and a blank page in my
browser. Here are the start and end of the asyncore traceback:
error: uncaptured python exception, closing channel
<__main__.UserInterface connected at 0x534940>
(exceptions.RuntimeError:maximum recursion depth exceeded [/Users/skip/local/lib/python2.3/asyncore.py|read|69]
[/Users/skip/local/lib/python2.3/asyncore.py|handle_read_event|385]
[/Users/skip/local/lib/python2.3/asynchat.py|handle_read|136]
[/Users/skip/local/bin/pop3proxy.py|found_terminator|808]
[/Users/skip/local/bin/pop3proxy.py|onRequest|834]
[/Users/skip/local/bin/pop3proxy.py|onReview|1146]
[/Users/skip/local/lib/python2.3/site-packages/spambayes/Corpus.py|__getitem__|208]
[/Users/skip/local/lib/python2.3/site-packages/spambayes/Corpus.py|__getattr__|282]
[/Users/skip/local/lib/python2.3/site-packages/spambayes/Corpus.py|__getattr__|282]
...
[/Users/skip/local/lib/python2.3/site-packages/spambayes/Corpus.py|__getattr__|282]
[/Users/skip/local/lib/python2.3/site-packages/spambayes/Corpus.py|__getattr__|282]
[/Users/skip/local/lib/python2.3/site-packages/spambayes/Corpus.py|__getattr__|282]
The proxy is started like so:
pop3proxy.py -p ~/hammie.db -d -l 11111 \
-e 'ssh -q -C -f mail.mojam.com -L 11110:localhost:110 bash -c \
"while true ; do sleep 60 ; done"' \
localhost 11110
(remove the backslashes before trying this at home). All the -e flag does
is get the associated command started up before doing anything else:
state.buildServerStrings()
pid = 0
if state.initCommand:
pid = spawnInitCommand(state.initCommand)
try:
main(state.servers, state.proxyPorts, state.uiPort,
state.launchUI)
finally:
if pid:
killInitCommand(pid)
spawnInitCommand and killInitCommand are straightforward:
# these may need some changing for non-Unixoid platforms
def spawnInitCommand(cmd):
"""run cmd (a string) in the background"""
cmd, args = cmd.split(" ", 1)
args = args.split()
return os.spawnvp(os.P_NOWAIT, cmd, args)
def killInitCommand(pid):
os.kill(pid, signal.SIGHUP)
Is anyone else seeing these problems? I'm running on Mac OS X with a fairly
recent CVS checkout of Python (Jan 7 2003, 16:09) and with spambayes updated
earlier today.
Thanks,
Skip
More information about the Spambayes
mailing list