[Spambayes] how to start spambayes

Tony Meyer tameyer at ihug.co.nz
Wed Apr 13 05:49:13 CEST 2005


> I would like to start it up automatically when I reboot. I also 
> wonder if it's possible to start it without having a terminal window. 
> Forgive me for I'm very new to Linux. In my first attempt I just
> included the following lines in the rc.locat file:
> 
> cd /etc/spambayes-1.0.4
> python scripts/sb_server.py

It would probably be better to just have "python
/etc/spambayes-1.0.4/scripts/sb_server.py" rather than change the local
directory.  (Assuming that setup.py install has been run, or spambayes is on
the PYTHONPATH some other way).

> During boot-up, the computer got to 'start local', and just 
> hung. Would this be because it was trying to initiate a service that 
> needed X to be running?

SpamBayes doesn't need X.

> Could one of you tell me a simple way of doing this? 

If you change the line to "python /etc/spambayes-1.0.4/scripts/sb_server.py
&", does that work?

> I did read the enabling spamd as a unix daemon page on the Spambayes
> website, but, I just don't know enough to know how to modify it.

I believe you can just save either script as is (as "/etc/init.d/spambayes"
or "/etc/spamd/spamd"), and then in rc.local you have "/etc/init.d/spambayes
start" (if you use the first script) or "/etc/spamd/spamd" (if you use the
second).

If you use the first script, you can change the variables at the top:

SBPROXY=/opt/bin/sb_server.py

Location of the sb_server script.  I gather this would be
/etc/spambayes-1.0.4/scripts/sb_server.py for you.

SBLOG=/var/log/spam.log

The log.  Could be anything you like, including /dev/null.

SBDIR=/opt/sb_data

Location of the spambayes package, I think.  Maybe this is
/etc/spambayes-1.0.4/spambayes for you?

If none of this helps, try reposting, but with "linux" in the subject.  I
suspect that that's more likely to get the attention of someone that can
properly help.

=Tony.Meyer

-- 
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes.
http://www.massey.ac.nz/~tameyer/writing/reply_all.html explains this.



More information about the Spambayes mailing list