You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Sg <ge...@gmail.com> on 2008/01/07 10:51:25 UTC

How to restart the spamassassin in command prompt

Hi

      After modifying the configurations and scores should we restart the
SA. How to start the SA-3.2.3?

-- 
Sg

Re: How to restart the spamassassin in command prompt

Posted by Rubin Bennett <rb...@thatitguy.com>.
Some distros also have a spamd daemon, and so the spamd process would be
run by either:
service spamd restart
or
/etc/init.d/spamd restart

Regards,
Rubin

On Mon, 2008-01-07 at 16:41 +0200, Jari Fredriksson wrote:
> > Hi
> > 
> >       After modifying the configurations and scores
> > should we restart the SA. How to start the SA-3.2.3? 
> 
> /etc/init.d/spamassassin restart
>  
> That should work on all Linux systems. RedHad ans SuSE based have also
> a service command, which can be used to it.
>  
> service spamassassin restart
>  
>  


Re: How to restart the spamassassin in command prompt

Posted by Jari Fredriksson <ja...@iki.fi>.
> Hi
> 
>       After modifying the configurations and scores
> should we restart the SA. How to start the SA-3.2.3? 

/etc/init.d/spamassassin restart

That should work on all Linux systems. RedHad ans SuSE based have also a service command, which can be used to it.

service spamassassin restart


Re: How to restart the spamassassin in command prompt

Posted by Ben Lentz <BL...@channing-bete.com>.
>
>
> Anything else is just being fancy.  :)
>
> -Aubrey
>

I thought that was why these guys properly trap signals in spamd. :-)

killall -s SIGHUP spamd

Re: How to restart the spamassassin in command prompt

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> Sg wrote:
> >      After modifying the configurations and scores should we restart 
> >the SA. How to start the SA-3.2.3?

On 07.01.08 13:51, maillist wrote:
> you really should be able to just type in "\usr\bin\spamd" at the 
> command prompt, and it will start.  "man spamd" will show you the 
> switches involved.

\usr\bin\spamd ?

is this a joke or did I miss something?
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Honk if you love peace and quiet. 

Re: How to restart the spamassassin in command prompt

Posted by maillist <ma...@emailacs.com>.
Sg wrote:
> Hi
>
>       After modifying the configurations and scores should we restart 
> the SA. How to start the SA-3.2.3?
>
> -- 
> Sg 

you really should be able to just type in "\usr\bin\spamd" at the 
command prompt, and it will start.  "man spamd" will show you the 
switches involved.


I do this....

/usr/bin/spamd \
-r /var/run/spamd.pid \
-d --username=defang \
--max-spare=8 \
--min-children=10 \
--max-children=45

to end it....

killall spamd

Anything else is just being fancy.  :)

-Aubrey


Re: How to restart the spamassassin in command prompt

Posted by Matt Kettler <mk...@verizon.net>.
Sg wrote:
>
> Hi
>
>     Thanks for your reply. I need to checck the body content only not 
> header. What are all the rules used to check only body content?

You already asked this question, and I already answered it in your 
thread titled "Spam content checker":

------------------

There's hundreds of  rules for body content used in SA, and they change
all the time. Look for anything Anything that's a "body", "rawbody",
"uri" or "full" rule in the .cf files.

-------------

However, SpamAssassin is not designed to scan arbitrary text. It's 
designed to scan email.

Re: How to restart the spamassassin in command prompt

Posted by Sg <ge...@gmail.com>.
Hi

    Thanks for your reply. I need to checck the body content only not
header. What are all the rules used to check only body content?

On Jan 7, 2008 5:08 PM, Diego Pomatta <in...@abelsonsa.com.ar> wrote:

> Sg escribió:
> > Hi
> >
> >       After modifying the configurations and scores should we restart
> > the SA. How to start the SA-3.2.3?
> >
> > --
> > Sg
>
> Yes, you should restart SA after modifying configuration or rules/scores.
> SA comes with several control scripts that you can use to start, stop or
> restart the spamd daemon. I renamed mine to "spamdctl" and placed it in
> /usr/bin.
>
> Here it is, (I run SA 3.2.1 in a Mandrake 10 box)
>
> ---------
> #!/bin/sh
> #
> # spamassassin This script starts and stops the spamd daemon
> #
> # chkconfig: 2345 80 30
> #
> # description: spamd is a daemon process which uses SpamAssassin to check
> #              email messages for SPAM.  It is normally called by spamc
> #           from a MDA.
> # chkconfig: 345 40 80
>
> # Source function library.
> . /etc/rc.d/init.d/functions
>
> PATH=$PATH:/usr/local/sbin
> case "$1" in
>  start)
>    cd /
>
>    spamd -l -L -s stderr -r /var/run/spamd.pid \
>    --siteconfigpath=/etc/mail/spamassassin --nouser-config \
>    --socketpath=/tmp/spamd.sock 2>&1 | \
>        /usr/local/bin/setuidgid qmaill \
>    /usr/local/bin/multilog t n20 s1000000 /var/log/spamd &
>    echo "spamd iniciado"
>     ;;
>
>  stop)
>        if [ -r /var/run/spamd.pid ]; then
>          pid=`cat /var/run/spamd.pid`
>          kill $pid || ( echo "spamd no pudo ser detenido" && exit 1 )
>          echo "spamd (pid $pid) detenido"
>        else
>          echo "/var/run/spamd.pid no existe, se esta ejecutando spamd?"
>        fi
>    ;;
>
>  restart)
>    $0 stop && sleep 2 &&  $0 start
>    ;;
>
>  *)
>    echo "uso: $0 (start|stop|restart)"
>    ;;
> esac
> ---------------
>



-- 
Sg

Re: How to restart the spamassassin in command prompt

Posted by Diego Pomatta <in...@abelsonsa.com.ar>.
Sg escribió:
> Hi
>
>       After modifying the configurations and scores should we restart 
> the SA. How to start the SA-3.2.3?
>
> -- 
> Sg 

Yes, you should restart SA after modifying configuration or rules/scores.
SA comes with several control scripts that you can use to start, stop or 
restart the spamd daemon. I renamed mine to "spamdctl" and placed it in 
/usr/bin.

Here it is, (I run SA 3.2.1 in a Mandrake 10 box)

---------
#!/bin/sh
#
# spamassassin This script starts and stops the spamd daemon
#
# chkconfig: 2345 80 30
#
# description: spamd is a daemon process which uses SpamAssassin to check
#              email messages for SPAM.  It is normally called by spamc
#           from a MDA.
# chkconfig: 345 40 80

# Source function library.
. /etc/rc.d/init.d/functions

PATH=$PATH:/usr/local/sbin
case "$1" in
  start)
    cd /

    spamd -l -L -s stderr -r /var/run/spamd.pid \
    --siteconfigpath=/etc/mail/spamassassin --nouser-config \
    --socketpath=/tmp/spamd.sock 2>&1 | \
        /usr/local/bin/setuidgid qmaill \
    /usr/local/bin/multilog t n20 s1000000 /var/log/spamd &
    echo "spamd iniciado"
     ;;

  stop)
        if [ -r /var/run/spamd.pid ]; then
          pid=`cat /var/run/spamd.pid`
          kill $pid || ( echo "spamd no pudo ser detenido" && exit 1 )
          echo "spamd (pid $pid) detenido"
        else
          echo "/var/run/spamd.pid no existe, se esta ejecutando spamd?"
        fi
    ;;

  restart)
    $0 stop && sleep 2 &&  $0 start
    ;;

  *)
    echo "uso: $0 (start|stop|restart)"
    ;;
esac
---------------