Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: users

How to restart the spamassassin in command prompt

 

 

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded


geeth4sg at gmail

Jan 7, 2008, 1:51 AM

Post #1 of 9 (353 views)
Permalink
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


geeth4sg at gmail

Jan 7, 2008, 2:52 AM

Post #2 of 9 (327 views)
Permalink
Re: How to restart the spamassassin in command prompt [In reply to]

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 <infosis [at] abelsonsa> 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


infosis at abelsonsa

Jan 7, 2008, 3:38 AM

Post #3 of 9 (322 views)
Permalink
Re: How to restart the spamassassin in command prompt [In reply to]

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
---------------


mkettler_sa at verizon

Jan 7, 2008, 4:26 AM

Post #4 of 9 (334 views)
Permalink
Re: How to restart the spamassassin in command prompt [In reply to]

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.


jarif at iki

Jan 7, 2008, 6:41 AM

Post #5 of 9 (333 views)
Permalink
Re: How to restart the spamassassin in command prompt [In reply to]

> 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


rbennett at thatitguy

Jan 7, 2008, 6:46 AM

Post #6 of 9 (333 views)
Permalink
Re: How to restart the spamassassin in command prompt [In reply to]

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
>
>


maillist at emailacs

Jan 7, 2008, 11:51 AM

Post #7 of 9 (333 views)
Permalink
Re: How to restart the spamassassin in command prompt [In reply to]

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


BLentz at channing-bete

Jan 7, 2008, 11:59 AM

Post #8 of 9 (325 views)
Permalink
Re: How to restart the spamassassin in command prompt [In reply to]

>
>
> Anything else is just being fancy. :)
>
> -Aubrey
>

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

killall -s SIGHUP spamd


uhlar at fantomas

Jan 8, 2008, 3:19 AM

Post #9 of 9 (320 views)
Permalink
Re: How to restart the spamassassin in command prompt [In reply to]

> 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 [at] fantomas ; 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.

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.