[Spambayes] Spambayes on Mac OS X
Fran ç ois Granger
francois.granger at free.fr
Fri Mar 26 12:06:06 EST 2004
I moved to a new Mac with 10.3.3, so I decided to do a fresh install of the
latest of Spambayes. I downloaded the latest (b10) from CVS.
It is still absolutely wonderfull. Trained on only 10 ham, 10 spam, it
already filter most spams.
Checking the documentation page, I thought that there was some room for a
detailed proxy install for "Mac OS X newbie Unix users" and I started it. It
is currently a text document. I can make it an Html one.
I enclose it below for review.
========================================================
Mac OS X install
Create a directory spambayes inside your user directory
After download of Spambayes and decompressing, open a terminal window:
fgranger$ cd /usr/local
fgranger$ md bin
fgranger$ chmod a+x bin
fgranger$ cd /path/to/decompressed/spambayes
replace by the name of the directory, or type "cd " in the terminal window
then drag the directory icon from the finder to the terminal windows.
fgranger$ python setup.py install
fgranger$ cd build/scripts-2.3
fgranger$ pico spamd
copy & past the following inside the window
---- start copy
#!/bin/sh
#
# spamd This shell script takes care of starting and stopping
# the spambayes deamon.
#
# Author: Dave Handley
# Date: 11 Oct 03
#
# Changes: François Granger for Mac SO X
# Date: 26 Mar 04
#
# Source function library.
#. /etc/rc.d/init.d/functions
# Source networking configuration.
#. /etc/sysconfig/network
RETVAL=0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting spamd: "
cd /Users/fgranger/spambayes # replace fgranger by your login
/usr/local/bin/sb_server.py &
RETVAL=$?
echo
;;
stop)
# Stop daemons.
echo -n "Shutting down spamd: "
killall sb_server.py
RETVAL=$?
echo
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status sb_server.py
RETVAL=$?
;;
*)
echo "Usage: spamd {start|stop|restart|status}"
exit 1
esac
exit $RETVAL
---- stop copy
Then Ctrl-w, Ctrl-x
fgranger$ chmod a+x spamd
fgranger$ cp * /usr/local/bin
fgranger$ cd /Users/fgranger/spambayes
fgranger$ pico bayescustomize.ini
Copy and past the following text inside the windows
---- start copy
[Storage]
persistent_use_database:pickle
---- stop copy
Then Ctrl-w, Ctrl-x
you can now type in :
fgranger$ /usr/local/bin/spamd start
After some days, you will only need to type:
fgranger$ spamd start
========================================================
More information about the Spambayes
mailing list