[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_debug_header: True

      in my options file and have BAYESCUSTOMIZE set to


    * 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]

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:

    pid = 0
    if state.initCommand:
        pid = spawnInitCommand(state.initCommand)
        main(state.servers, state.proxyPorts, state.uiPort,
        if 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.



More information about the Spambayes mailing list