[Spambayes] sb_server.py on linux - web interface not working

Morgan Collett morgan at mcode.co.za
Tue Nov 25 11:19:02 EST 2003


I'm installing spambayes on my DSL gateway, a debian linux box.

I'm running the following command line:
/usr/bin/sb_server.py -D /var/spambayes/spam.pickle pop.mcode.co.za

I get the following text when it starts:

 > SpamBayes POP3 Proxy Beta3, version 0.3 (September 2003),
 > using SpamBayes POP3 Proxy Web Interface Alpha3, version 0.03
 > and engine SpamBayes Beta2, version 0.2 (July 2003).
 >
 > Loading database... Listener on port 110 is proxying pop.mcode.co.za:110
 > User interface url is http://localhost:8880/

The problem is that the web interface is not working. If I use Mozilla 
to go to the URL (from a different box on my network) I get "Document 
contains no data".

If I telnet to the port, I get the following:

 > # telnet localhost 8880
 > Trying 127.0.0.1...
 > Connected to localhost.
 > Escape character is '^]'.
 > GET /
 >
 > HTTP/1.0 400 Error
 > Connection: close
 > Content-Type: text/html
 >
 > <html><body>Malformed request: 'GET /'</body></html>Connection closed 
by foreign host.

If I start sb_server.py with -b, it opens lynx on my gateway box, which 
just sits there trying to connect until I hit ^C. Then I get:

 > error: uncaptured python exception, closing channel
 > <spambayes.Dibbler._HTTPHandler connected at 0x8399b2c>
 > (socket.error:(32, 'Broken pipe')
 > [/usr/lib/python2.2/asynchat.py|initiate_send|213]
 > [/usr/lib/python2.2/asyncore.py|send|339])

I then hit ^C again, and get:

 > Traceback (most recent call last):
 >   File "/usr/bin/sb_server.py", line 833, in ?
 >     run()
 >   File "/usr/bin/sb_server.py", line 827, in run
 >     start(state=state)
 >   File "/usr/bin/sb_server.py", line 767, in start
 >     main(state.servers, state.proxyPorts, state.uiPort, state.launchUI)
 >   File "/usr/bin/sb_server.py", line 748, in main
 >     Dibbler.run(launchBrowser=launchUI)
 >   File "/usr/lib/python2.2/site-packages/spambayes/Dibbler.py", line 
689, in run
 >     asyncore.loop(map=context._map)
 >   File "/usr/lib/python2.2/asyncore.py", line 201, in loop
 >     poll_fun (timeout, map)
 >   File "/usr/lib/python2.2/asyncore.py", line 79, in poll
 >     r,w,e = select.select (r,w,e, timeout)
 > KeyboardInterrupt

Note: I'm using Debian stable (woody) which has Python 2.2.1. I have 
copied the /usr/lib/python2.2/email/ files from the install from debian 
unstable, which has Python 2.2.3. That fixed the error message when I 
installed spambayes. Do I need to do anything else?




More information about the Spambayes mailing list