Re: Help starting service

2005-11-10 Thread Theo Van Dinter
FWIW, it's generally bad form to post HTML-only messages to mailing lists.


On Thu, Nov 10, 2005 at 02:33:37PM -0500, Jeffrey Duncan wrote:

-- 
Randomly Generated Tagline:
If we can't keep this sort of thing out of the kernel, we might as well
 pack it up and go run Solaris. - Larry McVoy


pgpWfM2CVuyJt.pgp
Description: PGP signature


RE: Help starting service

2005-11-10 Thread Bowie Bailey
From: Jeffrey Duncan [mailto:[EMAIL PROTECTED]
 
 I installed SA 3.1.0 using the CPAN install Mail::SpamAssassin
 method and all went well with no errors.  
 
 I cannot however get the service started.  I am using Qmail from the
 qmailrocks install.  I have removed all my old SA 3.0.2 files and
 started fresh.  What can I do at this point to make the SA work with
 qmail 

Details please!

How are you trying to start the service?  Do you get any error
messages?  Have you checked the log files?

Bowie


Re: Help starting service

2005-11-10 Thread Mathieu CHATEAU




Hello Jeffrey,

what is your platform ?

You need to install sa-spamd daemon.
qmail-scanner use spamc which then communicate with spamassassin daemon.

cheers,
Mathieu CHATEAU

Thursday, November 10, 2005, 8:33:37 PM, you wrote:

--
Best regards,
Mathieu  mailto:[EMAIL PROTECTED]





Re: Help starting service

2005-11-10 Thread Jeffrey Duncan
Hello.  I am running FC4.  I can start the service on the command line 
by just typing spamd and it all works fine.  Must be something very 
simple - been at this all day !


I have tried to start the service the following ways ...

# service spamassassin start
spamassassin: unrecognized service

and

# /etc/rc.d/init.d/spamassassin start
-bash: /etc/rc.d/init.d/spamassassin: No such file or directory

Thanks for the help.

Jeff



Mathieu CHATEAU wrote:


Hello Jeffrey,


what is your platform ?


You need to install sa-spamd daemon.

qmail-scanner  use spamc which then communicate with spamassassin daemon.


cheers,

Mathieu CHATEAU


Thursday, November 10, 2005, 8:33:37 PM, you wrote:


--

Best regards,

 Mathieumailto:[EMAIL PROTECTED]



Re: Help starting service

2005-11-10 Thread Matt Kettler
Jeffrey Duncan wrote:
 Hello.  I am running FC4.  I can start the service on the command line
 by just typing spamd and it all works fine.  Must be something very
 simple - been at this all day !
 
 I have tried to start the service the following ways ...
 
 # service spamassassin start
 spamassassin: unrecognized service
 
 and
 
 # /etc/rc.d/init.d/spamassassin start
 -bash: /etc/rc.d/init.d/spamassassin: No such file or directory
 

look in /etc/rc.d/init.d and see if theres a spamd service instead of a
spamassassin service.


Also, when you re-installed, how did you re-install?


Re: Help starting service

2005-11-10 Thread Jeffrey Duncan
I installed using cpan Mail::SpamAssassin as listed on SA site.  It's 
working, but it won't start as a service.


neither service is listed in that directory.

Matt Kettler wrote:

Jeffrey Duncan wrote:
  

Hello.  I am running FC4.  I can start the service on the command line
by just typing spamd and it all works fine.  Must be something very
simple - been at this all day !

I have tried to start the service the following ways ...

# service spamassassin start
spamassassin: unrecognized service

and

# /etc/rc.d/init.d/spamassassin start
-bash: /etc/rc.d/init.d/spamassassin: No such file or directory




look in /etc/rc.d/init.d and see if theres a spamd service instead of a
spamassassin service.


Also, when you re-installed, how did you re-install?


  


Re: Help starting service

2005-11-10 Thread Matt Kettler
Jeffrey Duncan wrote:
 I installed using cpan Mail::SpamAssassin as listed on SA site.  It's
 working, but it won't start as a service.
 
 neither service is listed in that directory.

Ok, if you installed from CPAN, you essentially installed from source.

The source will NOT install a service script.

Service scripts are distribution specific. ie: they differ between Redhat Linux,
suse Linux, Solaris, and freebsd. There is no universal common format for them
that applies to all *nix oses.

The SA source does come with several service scripts you can use, but it doesn't
automatically install them.

Find the redhat-rc-script.sh (probably in /root/.cpan/ somewhere) and copy it
to /etc/rc.d/init.d/spamassassin. That should let you treat SA as a redhatish
service.






RE: Help starting service

2005-11-10 Thread Bowie Bailey
From: Jeffrey Duncan [mailto:[EMAIL PROTECTED]
 
 I installed using cpan Mail::SpamAssassin as listed on SA site.  It's 
 working, but it won't start as a service.
 
 neither service is listed in that directory.

I install the same way and I've got an /etc/rc.d/init.d/spamd file to
do the startup.  It's possible I may have written it myself.

Try putting the file listed below into /etc/rc.d/init.d/spamd (or
spamassassin, whichever you prefer).

Bowie




#!/bin/bash
# chkconfig: 2345 30 70
# Description: Daemon for email spam checking
# Startup file for spamd
#

export LC_ALL=C

# source function library
. /etc/init.d/functions

RETVAL=0

start() {
echo -n $Starting SpamAssassin daemon: 
/usr/bin/spamd -d -m 8 --max-conn-per-child=50 -r
/var/run/spamd/spamd.pid
echo
return 0
}

stop() {
echo -n $Stopping SpamAssassin daemon: 
kill `cat /var/run/spamd/spamd.pid`
echo
return 0
}

reload(){
stop
start
}

restart(){
stop
start
}


case $1 in
  start)
start
;;
  stop)
stop
;;
  restart)
restart
;;
  reload)
reload
;;
  *)
echo $Usage: $0 {start|stop|restart|reload}
RETVAL=1
esac

exit $RETVAL


Re: Help starting service

2005-11-10 Thread Jeffrey Duncan

I get the following after creating the script, chmod +x ..

Starting SpamAssassin daemon: [16717] warn: Option r requires an argument
/etc/init.d/spamd: line 17: /var/run/spamd/spamd.pid: No such file or 
directory






Bowie Bailey wrote:

From: Jeffrey Duncan [mailto:[EMAIL PROTECTED]
  
I installed using cpan Mail::SpamAssassin as listed on SA site.  It's 
working, but it won't start as a service.


neither service is listed in that directory.



I install the same way and I've got an /etc/rc.d/init.d/spamd file to
do the startup.  It's possible I may have written it myself.

Try putting the file listed below into /etc/rc.d/init.d/spamd (or
spamassassin, whichever you prefer).

Bowie




#!/bin/bash
# chkconfig: 2345 30 70
# Description: Daemon for email spam checking
# Startup file for spamd
#

export LC_ALL=C

# source function library
. /etc/init.d/functions

RETVAL=0

start() {
echo -n $Starting SpamAssassin daemon: 
/usr/bin/spamd -d -m 8 --max-conn-per-child=50 -r
/var/run/spamd/spamd.pid
echo
return 0
}

stop() {
echo -n $Stopping SpamAssassin daemon: 
kill `cat /var/run/spamd/spamd.pid`
echo
return 0
}

reload(){
stop
start
}

restart(){
stop
start
}


case $1 in
  start)
start
;;
  stop)
stop
;;
  restart)
restart
;;
  reload)
reload
;;
  *)
echo $Usage: $0 {start|stop|restart|reload}
RETVAL=1
esac

exit $RETVAL


  


RE: Help starting service

2005-11-10 Thread Bowie Bailey
From: Jeffrey Duncan [mailto:[EMAIL PROTECTED]
 
 I get the following after creating the script, chmod +x ..
 
 Starting SpamAssassin daemon: [16717] warn: Option r requires an
 argument /etc/init.d/spamd: line 17: /var/run/spamd/spamd.pid: No
 such file or directory

Right... The following should be one line:

  /usr/bin/spamd -d -m 8 --max-conn-per-child=50 -r
/var/run/spamd/spamd.pid

That second line is actually the argument to '-r'.

Bowie


Re: Help starting service

2005-11-10 Thread Jeffrey Duncan

Great I am almost there!  A cpuple more things ...
How do I get it to start on boot?  The same way with chkconfig spamd on ?

and

The STOP fails ..

# service spamd start
Starting SpamAssassin daemon:
# service spamd stop
Stopping SpamAssassin daemon: cat: /var/run/spamd/spamd.pid: No such 
file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or 
kill -l [sigspec]


Bowie Bailey wrote:

From: Jeffrey Duncan [mailto:[EMAIL PROTECTED]
  

I get the following after creating the script, chmod +x ..

Starting SpamAssassin daemon: [16717] warn: Option r requires an
argument /etc/init.d/spamd: line 17: /var/run/spamd/spamd.pid: No
such file or directory



Right... The following should be one line:

  /usr/bin/spamd -d -m 8 --max-conn-per-child=50 -r
/var/run/spamd/spamd.pid

That second line is actually the argument to '-r'.

Bowie


  


RE: Help starting service

2005-11-10 Thread Bowie Bailey
From: Jeffrey Duncan [mailto:[EMAIL PROTECTED]
 
 Great I am almost there!  A cpuple more things ...
 How do I get it to start on boot?  The same way with 
 chkconfig spamd on ?
 
 and
 
 The STOP fails ..
 
 # service spamd start
 Starting SpamAssassin daemon:
 # service spamd stop
 Stopping SpamAssassin daemon: cat: /var/run/spamd/spamd.pid: No such 
 file or directory
 kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | 
 job]... or 
 kill -l [sigspec]

The script tries to record the pid in /var/run/spamd/spamd.pid.  If
the directory doesn't exist (or isn't writable), it fails.

What you need to do is create the directory and chown it to the user
spamd runs as.

For example (assuming your spamd user is 'spamscan'):

mkdir /var/run/spamd
chown spamscan /var/run/spamd

The chkconfig information is already in the file.  To get it to run at
startup, simply do this:

chkconfig --add spamd

This will cause it to start in runlevels 2-5.  To change the runlevel
settings, take a look at the man page for chkconfig.  It's very easy
to use.

Bowie


Re: Help starting service

2005-11-10 Thread Jeffrey Duncan

Perfect, that did the trick.  Thanks for your help with all this!

Cheers,

Jeff

Bowie Bailey wrote:

From: Jeffrey Duncan [mailto:[EMAIL PROTECTED]
  

Great I am almost there!  A cpuple more things ...
How do I get it to start on boot?  The same way with 
chkconfig spamd on ?


and

The STOP fails ..

# service spamd start
Starting SpamAssassin daemon:
# service spamd stop
Stopping SpamAssassin daemon: cat: /var/run/spamd/spamd.pid: No such 
file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | 
job]... or 
kill -l [sigspec]



The script tries to record the pid in /var/run/spamd/spamd.pid.  If
the directory doesn't exist (or isn't writable), it fails.

What you need to do is create the directory and chown it to the user
spamd runs as.

For example (assuming your spamd user is 'spamscan'):

mkdir /var/run/spamd
chown spamscan /var/run/spamd

The chkconfig information is already in the file.  To get it to run at
startup, simply do this:

chkconfig --add spamd

This will cause it to start in runlevels 2-5.  To change the runlevel
settings, take a look at the man page for chkconfig.  It's very easy
to use.

Bowie