UserPreferences

DebianEtchInstall


Note: This wiki is now frozen; you can no longer edit it, and no interactive features work.

1. SPAMBAYES (1.1a3) /w python2.4 as POP3-Proxy (+ as root user)

this is a installation-howto written by a non-expert linux user for a fresh debian 4.0 (etch, stable) installation (business card).

please feel free correcting... (and excuse my english :) )

Testsystem (in case problemes should occur due to):

Legend: "~" -> homedir


1.1. Browse releases, download & unzip

1.2. Prerequisites

1.3. Installation

1.4. Configuration

[html_ui]
allow_remote_connections:1.2.3.4

Remember to change "1.2.3.4" with the IP of the computer going to access it for the first time (maybe 192.168.2.111)

1.5. Missing

ATTENTION: this tutorial is not finished as I need some help (please :))

1) use some "sb_data" path during installation (e.g. not place the db in ~ but something like ~/sb_data -> fixed, see init.d/daemon script below! (sorry for my missunderstanding)

2) auto-generate "bayescustomize.ini" with all values (even if default - I think/believe this would make a better handling with that file)

3) Very important: when auto-generating the config (see above) please make default value auf html_ui -> allow_conne* to "*", so remote installations are actually possible

1.6. Attachments (Beta)

1.6.1. init.d/daemon script

#!/bin/sh
#
# Version:      @(#) /etc/init.d/spambayes 0.2
# Feedback:     guwapo AT thedoghouse DOT bz
# Changelog:
#               21.04.2007 / guwapo / added: "pidof" syntax for better recon
#                            guwapo / added: config overhead for better overview
#                            guwapo / fixed: if workingdir does not exist -> mkdir!



# config (please change)
SBPROXY=/usr/bin/sb_server.py
SBDIR=/opt/sb_data

# main algo (no changes below!)

start () {
    echo -n "Starting SpamBayes POP3 proxy: "
    if [ ! -d $SBDIR ]
    then
        mkdir $SBDIR
    fi
    cd $SBDIR
    $SBPROXY > /dev/null &
    kid=`pidof -x sb_server.py`
    if [ $kid ]
    then
        echo "ok."
    fi
}

stop () {
    echo -n "Stopping SpamBayes POP3 proxy: "
    kid=`pidof -x sb_server.py`
    if [ $kid ]
    then
        kill $kid
        echo "stopped."
    else
        echo "nothing to kill."
    fi
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    *)
        echo "Usage: $0 {start|stop}"
esac

1.6.2. error when saving config

after saving:
500 Server error

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/spambayes/Dibbler.py", line 476, in found_terminator
    getattr(plugin, name)(**params)

  File "/usr/lib/python2.4/site-packages/spambayes/UserInterface.py", line 884, in onChangeopts
    self.reReadOptions()

  File "/usr/lib/python2.4/site-packages/spambayes/ProxyUI.py", line 782, in reReadOptions
    state = self.state_recreator()

  File "/usr/bin/sb_server.py", line 1007, in _recreateState
    prepare()

  File "/usr/bin/sb_server.py", line 1022, in prepare
    state.prepare(can_stop)

  File "/usr/bin/sb_server.py", line 822, in prepare
    self.createWorkers()

  File "/usr/bin/sb_server.py", line 889, in createWorkers
    self.stats = Stats.Stats(options, self.mdb)

  File "/usr/lib/python2.4/site-packages/spambayes/Stats.py", line 60, in __init__
    self.from_date = self.messageinfo_db.get_statistics_start_date()

AttributeError: 'NoneType' object has no attribute 'get_statistics_start_date'
when then going to home:
Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/spambayes/Dibbler.py", line 476, in found_terminator
    getattr(plugin, name)(**params)

  File "/usr/lib/python2.4/site-packages/spambayes/ProxyUI.py", line 184, in onHome
    state.buildStatusStrings()

  File "/usr/bin/sb_server.py", line 835, in buildStatusStrings
    nspam = self.bayes.nspam

AttributeError: 'NoneType' object has no attribute 'nspam'