Mailing List Archive

Auto-download of *.cf files
I remember some people talking about using a perl script to download new cf
files daily.

Does anyone have a vb or javascript version of it? I'm loath to install
perl on my mailserver if there's already another version.

Thanks,


Carl Chipman
Nomadics, Inc.
cchipman@nomadics.com
http://www.nomadics.com
Re: Auto-download of *.cf files [ In reply to ]
-----Original Message-----
From: "Carl Chipman" <cchipman@nomadics.com>
To: <spamassassin-users@incubator.apache.org>
Date: Wed, 4 Feb 2004 13:54:33 -0600
Subject: Auto-download of *.cf files

> I remember some people talking about using a perl script to download
> new cf
> files daily.
>
> Does anyone have a vb or javascript version of it? I'm loath to
> install
> perl on my mailserver if there's already another version.

Ditto on that - "Add me to your list". Or actually... I missed that
thread. I have Perl, so if someone has that script (I missed that thread),
please let me know!

Thanks.
RE: Auto-download of *.cf files [ In reply to ]
> -----Original Message-----
> From: Evan Platt [mailto:evan@espphotography.com]
> Sent: Wednesday, February 04, 2004 2:11 PM
> To: spamassassin-users@incubator.apache.org
> Subject: Re: Auto-download of *.cf files
>
> -----Original Message-----
> From: "Carl Chipman" <cchipman@nomadics.com>
> To: <spamassassin-users@incubator.apache.org>
> Date: Wed, 4 Feb 2004 13:54:33 -0600
> Subject: Auto-download of *.cf files
>
> > I remember some people talking about using a perl script to download
> > new cf
> > files daily.
> >
> > Does anyone have a vb or javascript version of it? I'm loath to
> > install
> > perl on my mailserver if there's already another version.
>
> Ditto on that - "Add me to your list". Or actually... I missed that
> thread. I have Perl, so if someone has that script (I missed
> that thread),
> please let me know!
>
> Thanks.
>
>

Evan,
Here is the location of Chris Thielen's "Rules Du Jour" script:
http://www.exit0.us/index.php/RulesDuJour

Cheers

-matt
Re: Auto-download of *.cf files [ In reply to ]
Good afternoon, Carl,

On Wed, 4 Feb 2004, Carl Chipman wrote:

> I remember some people talking about using a perl script to download new cf
> files daily.

http://sandgnat.com/rdj/rules_du_jour

> Does anyone have a vb or javascript version of it? I'm loath to install
> perl on my mailserver if there's already another version.

If you don't mind what might seem like a really silly question,
just how are you running Spamassassin without having Perl installed on at
lesat one machine in your building?
/me scratches head...
Cheers,
- Bill

---------------------------------------------------------------------------
"We had the support of management, but in the non-fiscal sense."
-- Damon Small (damon_small@mhhs.org)
--------------------------------------------------------------------------
William Stearns (wstearns@pobox.com). Mason, Buildkernel, freedups, p0f,
rsync-backup, ssh-keyinstall, dns-check, more at: http://www.stearns.org
--------------------------------------------------------------------------
Re: Auto-download of *.cf files [ In reply to ]
Evan Platt wrote:

>-----Original Message-----
>From: "Carl Chipman" <cchipman@nomadics.com>
>To: <spamassassin-users@incubator.apache.org>
>Date: Wed, 4 Feb 2004 13:54:33 -0600
>Subject: Auto-download of *.cf files
>
>
>
>>I remember some people talking about using a perl script to download
>>new cf
>>files daily.
>>
>>Does anyone have a vb or javascript version of it? I'm loath to
>>install
>>perl on my mailserver if there's already another version.
>>
>>
>
>Ditto on that - "Add me to your list". Or actually... I missed that
>thread. I have Perl, so if someone has that script (I missed that thread),
>please let me know!
>
>Thanks.
>
>
>
If you are using Linux, you can create a a very simple shell script to
do this. In fact, you can add each of the individual CF files you wish
to download with relative ease.

-- Script Starts Below this Line --
#!/bin/sh
## Originally by Doug Brott

# Randomize your download time (2 hour period)
# Comment out if you needed
rn=$(($RANDOM%7200))
sleep $rn

# Change to your Spamassassin CF directory
# This will cause a brute-force overwrite of the files. You might not
want to do that.
cd /etc/mail/spamassassin

lftp -c "get http://PATH-TO-CF-FILE"
-- End of Script --

- Please note, you MUST have lftp installed.
- You can use wget also, but the syntax will be slightly different.
- You can include multiple lftp lines to get each of the files as
necessary.
- I have not included any PATH-TO-CF-FILE.
- There is no perl involved, this is a very simple shell script.

You can add a cron entry to call this nightly.
# crontab -e

-- Add the following line --
0 1 * * * PATH-TO-SHELL-SCRIPT > /dev/null 2>&1o

Please note that PATH-TO-SHELL-SCRIPT is the path where you saved the
shell script above. Make surei it is executable.

Regards.

--
Doug Brott
brott@redh.com
RE: Auto-download of *.cf files [ In reply to ]
It's a windows box, and as far as I can tell, they software writers used
perl58.dll for internal perl scripting... I don't know how to access that
DLL from the cmd line or scripted access if its even possible.


Carl Chipman
Nomadics, Inc.
cchipman@nomadics.com
http://www.nomadics.com


-----Original Message-----
From: William Stearns [mailto:wstearns@pobox.com]
Sent: Wednesday, February 04, 2004 2:33 PM
To: Carl Chipman
Cc: ML-spamassassin-talk
Subject: Re: Auto-download of *.cf files

Good afternoon, Carl,

On Wed, 4 Feb 2004, Carl Chipman wrote:

> I remember some people talking about using a perl script to download new
cf
> files daily.

http://sandgnat.com/rdj/rules_du_jour

> Does anyone have a vb or javascript version of it? I'm loath to install
> perl on my mailserver if there's already another version.

If you don't mind what might seem like a really silly question,
just how are you running Spamassassin without having Perl installed on at
lesat one machine in your building?
/me scratches head...
Cheers,
- Bill

---------------------------------------------------------------------------
"We had the support of management, but in the non-fiscal sense."
-- Damon Small (damon_small@mhhs.org)
--------------------------------------------------------------------------
William Stearns (wstearns@pobox.com). Mason, Buildkernel, freedups, p0f,
rsync-backup, ssh-keyinstall, dns-check, more at: http://www.stearns.org
--------------------------------------------------------------------------
RE: Auto-download of *.cf files [ In reply to ]
Check out the Rules Du Jour Script to auto download custom rule sets.

http://www.exit0.us/index.php/RulesDuJour


-----Original Message-----
From: Evan Platt [mailto:evan@espphotography.com]
Sent: Wednesday, February 04, 2004 1:11 PM
To: spamassassin-users@incubator.apache.org
Subject: Re: Auto-download of *.cf files

-----Original Message-----
From: "Carl Chipman" <cchipman@nomadics.com>
To: <spamassassin-users@incubator.apache.org>
Date: Wed, 4 Feb 2004 13:54:33 -0600
Subject: Auto-download of *.cf files

> I remember some people talking about using a perl script to download
> new cf files daily.
>
> Does anyone have a vb or javascript version of it? I'm loath to
> install perl on my mailserver if there's already another version.

Ditto on that - "Add me to your list". Or actually... I missed that thread.
I have Perl, so if someone has that script (I missed that thread), please
let me know!

Thanks.
RE: Auto-download of *.cf files [ In reply to ]
At 02:50 PM 2.4.2004 -0700, Andrew Ott wrote:
> Check out the Rules Du Jour Script to auto download custom rule sets.
>
>http://www.exit0.us/index.php/RulesDuJour
>
>
>-----Original Message-----
>From: Evan Platt [mailto:evan@espphotography.com]
>Sent: Wednesday, February 04, 2004 1:11 PM
>To: spamassassin-users@incubator.apache.org
>Subject: Re: Auto-download of *.cf files
>
>-----Original Message-----
>From: "Carl Chipman" <cchipman@nomadics.com>
>To: <spamassassin-users@incubator.apache.org>
>Date: Wed, 4 Feb 2004 13:54:33 -0600
>Subject: Auto-download of *.cf files
>
>> I remember some people talking about using a perl script to download
>> new cf files daily.
>>
>> Does anyone have a vb or javascript version of it? I'm loath to
>> install perl on my mailserver if there's already another version.
>
>Ditto on that - "Add me to your list". Or actually... I missed that thread.
>I have Perl, so if someone has that script (I missed that thread), please
>let me know!
>
>Thanks.
>

Here's another than runs under Bourne shell (sh), a portion of which I got
from an earlier post. The interactive part after the LINTing could be
modified to use with cron because it will abort if not given a 'yes' within
30 secs. A lot less code......

START-----------------------------------------------------------
#!/bin/sh
MOVE="bigevil.cf 99_FVGT_Tripwire.cf backhair.cf chickenpox.cf weeds_2.cf
evilnumbers.cf antidrug.cf"

# List of files to grab
files="
http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf

http://www.merchantsoverseas.com/wwwroot/gorilla/99_FVGT_Tripwire.cf
http://www.emtinc.net/includes/backhair.cf
http://www.emtinc.net/includes/chickenpox.cf
http://www.emtinc.net/includes/weeds_2.cf
http://www.yackley.org/sa-rules/evilnumbers.cf
http://mywebpages.comcast.net/mkettler/sa/antidrug.cf
"
# Save backup of current set of rules
/bin/cp -fv ${MOVE} /usr/local/etc/mail/save

# change to the spamassassin config directory
cd /usr/local/etc/mail/spamassassin

# Grab all of the requested files
restart=0
for file in $files; do
if [ "$file" != "" ]; then
wget -Nv "$file" 2>&1 | grep saved
# Do we want SA to restart?
if [ $? = 0 ]; then
restart=1
fi
fi
done

# Restart spamassassin
if [ $restart = 1 ] ; then
cd /usr/local/etc/mail/spamassassin
/usr/local/bin/spamassassin --lint
get_yes_no() {
while true
do
echo -n "$1 (Y/N) ? "
read -t 30 a
if [ $? != 0 ]; then
a="No";
return;
fi
case $a in
[Yy]) a="Yes";
return;;
[Nn]) a="No";
return;;
*);;
esac
done
}

get_yes_no "Do you want to continue......"

[ $a = 'No' ] && exit 1

echo ".....starting NOW!............"
/usr/local/bin/spamass
echo "Restarted SpamAssassin"
fi
END-----------------------------------------------------------

Best regards,
Jack L. Stone,
Administrator

Sage American
http://www.sage-american.com
jacks@sage-american.com
RE: Auto-download of *.cf files [ In reply to ]
-----Original Message-----
From: "Andrew Ott" <aott@actcom.net>
To: <spamassassin-users@incubator.apache.org>
Date: Wed, 4 Feb 2004 14:50:22 -0700
Subject: RE: Auto-download of *.cf files

> Check out the Rules Du Jour Script to auto download custom rule sets.
>
> http://www.exit0.us/index.php/RulesDuJour

I use SpamAssassin on my Windoze machine with Alt-N Mdaemon. Since I am a
geek / nerd, I have perl, and a few other *nix type utilities, but not
touch, bin, bash, etc.

I DO have a copy of CygWin, so maybe it's time to get that up and running.
Or is there something else for *Doze I can use?

Thanks. :)
RE: Auto-download of *.cf files [ In reply to ]
Hi All,
Just like to say thanks to whoever wrote these scripts. i've majorly
simplified mine now with that loop...

regards
M


------------------
#!/bin/sh

files="
http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf
http://www.merchantsoverseas.com/wwwroot/gorilla/99_FVGT_Tripwire.cf
http://www.emtinc.net/includes/backhair.cf
http://www.emtinc.net/includes/chickenpox.cf
http://www.emtinc.net/includes/weeds_2.cf
http://www.yackley.org/sa-rules/evilnumbers.cf
http://mywebpages.comcast.net/mkettler/sa/antidrug.cf
"

cd /etc/mail/spamassassin

for file in $files; do
if [ "$file" != "" ]; then
wget -Nv "$file" 2>&1 | grep saved
fi
done

if [ $? = 0 ] ; then
/etc/init.d/MailScanner restart
fi
-----------------

-----Original Message-----
From: Jack L. Stone [mailto:jacks@sage-american.com]
Sent: Thursday, February 05, 2004 8:53 AM
To: Andrew Ott; spamassassin-users@incubator.apache.org
Subject: RE: Auto-download of *.cf files


At 02:50 PM 2.4.2004 -0700, Andrew Ott wrote:
> Check out the Rules Du Jour Script to auto download custom rule sets.
>
>http://www.exit0.us/index.php/RulesDuJour
>
>
>-----Original Message-----
>From: Evan Platt [mailto:evan@espphotography.com]
>Sent: Wednesday, February 04, 2004 1:11 PM
>To: spamassassin-users@incubator.apache.org
>Subject: Re: Auto-download of *.cf files
>
>-----Original Message-----
>From: "Carl Chipman" <cchipman@nomadics.com>
>To: <spamassassin-users@incubator.apache.org>
>Date: Wed, 4 Feb 2004 13:54:33 -0600
>Subject: Auto-download of *.cf files
>
>> I remember some people talking about using a perl script to download
>> new cf files daily.
>>
>> Does anyone have a vb or javascript version of it? I'm loath to
>> install perl on my mailserver if there's already another version.
>
>Ditto on that - "Add me to your list". Or actually... I missed that thread.
>I have Perl, so if someone has that script (I missed that thread), please
>let me know!
>
>Thanks.
>

Here's another than runs under Bourne shell (sh), a portion of which I got
from an earlier post. The interactive part after the LINTing could be
modified to use with cron because it will abort if not given a 'yes' within
30 secs. A lot less code......

START-----------------------------------------------------------
#!/bin/sh
MOVE="bigevil.cf 99_FVGT_Tripwire.cf backhair.cf chickenpox.cf weeds_2.cf
evilnumbers.cf antidrug.cf"

# List of files to grab
files="
http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf

http://www.merchantsoverseas.com/wwwroot/gorilla/99_FVGT_Tripwire.cf
http://www.emtinc.net/includes/backhair.cf
http://www.emtinc.net/includes/chickenpox.cf
http://www.emtinc.net/includes/weeds_2.cf
http://www.yackley.org/sa-rules/evilnumbers.cf
http://mywebpages.comcast.net/mkettler/sa/antidrug.cf
"
# Save backup of current set of rules
/bin/cp -fv ${MOVE} /usr/local/etc/mail/save

# change to the spamassassin config directory
cd /usr/local/etc/mail/spamassassin

# Grab all of the requested files
restart=0
for file in $files; do
if [ "$file" != "" ]; then
wget -Nv "$file" 2>&1 | grep saved
# Do we want SA to restart?
if [ $? = 0 ]; then
restart=1
fi
fi
done

# Restart spamassassin
if [ $restart = 1 ] ; then
cd /usr/local/etc/mail/spamassassin
/usr/local/bin/spamassassin --lint
get_yes_no() {
while true
do
echo -n "$1 (Y/N) ? "
read -t 30 a
if [ $? != 0 ]; then
a="No";
return;
fi
case $a in
[Yy]) a="Yes";
return;;
[Nn]) a="No";
return;;
*);;
esac
done
}

get_yes_no "Do you want to continue......"

[ $a = 'No' ] && exit 1

echo ".....starting NOW!............"
/usr/local/bin/spamass
echo "Restarted SpamAssassin"
fi
END-----------------------------------------------------------

Best regards,
Jack L. Stone,
Administrator

Sage American
http://www.sage-american.com
jacks@sage-american.com
Re: Auto-download of *.cf files [ In reply to ]
----- Original Message -----
From: "Evan Platt" <evan@espphotography.com>

> I use SpamAssassin on my Windoze machine with Alt-N Mdaemon. Since I am a
> geek / nerd, I have perl, and a few other *nix type utilities, but not
> touch, bin, bash, etc.
>
> I DO have a copy of CygWin, so maybe it's time to get that up and running.
> Or is there something else for *Doze I can use?

Most all of the other UNIX utilities for Win32 can be found at
http://unxutils.sourceforge.net

Bill
RE: Auto-download of *.cf files [ In reply to ]
> It's a windows box, and as far as I can tell, they software
> writers used perl58.dll for internal perl scripting... I
> don't know how to access that DLL from the cmd line or
> scripted access if its even possible.

It isn't possible directly, but it is possible by using a program to do
it. Does that mean that perl.exe doesn't exist? You'd have to have prety
much the rest of perl present to run SA. I do have a little program that
launches a perl script. Written to give us Windose folks some way to
tell the difference between Perl processes--otherwise they all list as
"perl.exe".

Bret
RE: Auto-download of *.cf files [ In reply to ]
One cool thing is that they point to a port of the Z Shell for Windows.

Very nice.

|-----Original Message-----
|From: Bill Landry [mailto:BillL@Pointshare.com]
|Sent: Wednesday, February 04, 2004 15:19
|To: spamassassin-users@incubator.apache.org
|Subject: Re: Auto-download of *.cf files
|
|
|----- Original Message -----
|From: "Evan Platt" <evan@espphotography.com>
|
|> I use SpamAssassin on my Windoze machine with Alt-N Mdaemon.
|Since I am a
|> geek / nerd, I have perl, and a few other *nix type
|utilities, but not
|> touch, bin, bash, etc.
|>
|> I DO have a copy of CygWin, so maybe it's time to get that
|up and running.
|> Or is there something else for *Doze I can use?
|
|Most all of the other UNIX utilities for Win32 can be found at
|http://unxutils.sourceforge.net
|
|Bill
|
RE: Auto-download of *.cf files [ In reply to ]
Folks,

Here's a script in between RulesDuJour and the one showin in this post in
terms of complexity. I've been using it to update rulesets, and just
added a bit of security checking for people who are interested. It was
designed to run interactively, but could happily run out of cron with a |
mail. It can trivally restart whatever you want at the end. It requires
ksh and a relatively standard set of UNIX tools. And it uses GET.

Enjoy.

David.

----- SNIP -----

#!/bin/ksh
#
# $Id: rules_update,v 1.8 2004-02-06 23:48:28-05 root Exp $
#
# ------

#
# Install directories
#
TMPDIR=/tmp
RULEDIR=/etc/spamassassin

#
# Max changes to a ruleset before you get worried
#
MAXCHANGE=200

#
# Timeout to HTTP GET in seconds.
#
TIMEOUT=10

#
# Your rules here.
#
RULES="
http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf
http://www.emtinc.net/includes/backhair.cf
http://www.emtinc.net/includes/chickenpox.cf
http://www.yackley.org/sa-rules/evilnumbers.cf
"

#
# End of configuration
#
# --------------------
#
# Meat begins here
#
if [[ ! -d $TMPDIR ]]; then
print -u2 "No temporary directory $TMPDIR."
exit 1
fi

if [[ ! -d $RULEDIR ]]; then
print -u2 "No rules directory $RULEDIR."
exit 1
fi

for RULE in $RULES; do
RULENAME=${RULE##*/}
rm -f $TMPDIR/.$RULENAME
if [[ $? -ne 0 ]]; then
print -u2 "Unable to remove exiting $TMPDIR/.$RULENAME - security hole! Exiting...."
exit 1
fi
#
# Get it with a $TIMEOUT
#
print "Going after $RULENAME...."
print " URL: $RULE"
print -n " "
GET -t $TIMEOUT $RULE > $TMPDIR/.$RULENAME 2> $TMPDIR/.$RULENAME.err
if [[ $? = 0 ]]; then
print "...got it!"
if [[ ! -f $RULEDIR/$RULENAME ]]; then
#
# Just install it here
#
print " Fresh install of this rule."
mv $TMPDIR/.$RULENAME $RULEDIR/$RULENAME
if [[ $? -ne 0 ]]; then
print "Install into $RULEDIR/$RULENAME failed (mv status $?)."
exit 1
fi
CHECK=1
else
#
# Check to see how different it is....
#
SIZE=$( diff $TMPDIR/.$RULENAME $RULEDIR/$RULENAME | wc -l | awk '{print $1}' )
if [[ $SIZE -eq 0 ]]; then
print " Skipping $RULENAME - no change."
elif [[ $SIZE -gt 100 ]]; then
print " $RULENAME has more than 100 changes ($SIZE) - please validate manually."
print " $RULENAME in $TMPDIR/.$RULENAME for checking."
else
print " Updating $RULENAME - $SIZE or so changes."
rm -f $RULEDIR/$RULENAME
mv $TMPDIR/.$RULENAME $RULEDIR/$RULENAME
if [[ $? -ne 0 ]]; then
print "Install into $RULEDIR/$RULENAME failed (mv status $?)."
exit 1
fi
CHECK=1
fi
fi
else
print "failed to get $RULENAME; error text in $TMPDIR/.$RULENAME.err."
fi
done

#
# Lint check
#
if [[ $CHECK -eq 1 ]]; then
print -n "Lint checking rules..."
spamassassin --lint > $TMPDIR/lint.out 2>&1
if [[ $? -ne 0 ]]; then
print -u2 "WARNING: lint check failed. Output in $TMPDIR/lint.out"
exit 1
fi
print "looks good!"
else
print "No rules change, nothing to do."
exit 0
fi

#
# Restart things here.
#
/etc/init.d/spamd restart

----- FINI -----

On Thu, 5 Feb 2004 mwestern@sola.com.au wrote:

> Hi All,
> Just like to say thanks to whoever wrote these scripts. i've majorly
> simplified mine now with that loop...
>
> regards
> M
>
>
> ------------------
> #!/bin/sh
>
> files="
> http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf
> http://www.merchantsoverseas.com/wwwroot/gorilla/99_FVGT_Tripwire.cf
> http://www.emtinc.net/includes/backhair.cf
> http://www.emtinc.net/includes/chickenpox.cf
> http://www.emtinc.net/includes/weeds_2.cf
> http://www.yackley.org/sa-rules/evilnumbers.cf
> http://mywebpages.comcast.net/mkettler/sa/antidrug.cf
> "
>
> cd /etc/mail/spamassassin
>
> for file in $files; do
> if [ "$file" != "" ]; then
> wget -Nv "$file" 2>&1 | grep saved
> fi
> done
>
> if [ $? = 0 ] ; then
> /etc/init.d/MailScanner restart
> fi
> -----------------
>
> -----Original Message-----
> From: Jack L. Stone [mailto:jacks@sage-american.com]
> Sent: Thursday, February 05, 2004 8:53 AM
> To: Andrew Ott; spamassassin-users@incubator.apache.org
> Subject: RE: Auto-download of *.cf files
>
>
> At 02:50 PM 2.4.2004 -0700, Andrew Ott wrote:
> > Check out the Rules Du Jour Script to auto download custom rule sets.
> >
> >http://www.exit0.us/index.php/RulesDuJour
> >
> >
> >-----Original Message-----
> >From: Evan Platt [mailto:evan@espphotography.com]
> >Sent: Wednesday, February 04, 2004 1:11 PM
> >To: spamassassin-users@incubator.apache.org
> >Subject: Re: Auto-download of *.cf files
> >
> >-----Original Message-----
> >From: "Carl Chipman" <cchipman@nomadics.com>
> >To: <spamassassin-users@incubator.apache.org>
> >Date: Wed, 4 Feb 2004 13:54:33 -0600
> >Subject: Auto-download of *.cf files
> >
> >> I remember some people talking about using a perl script to download
> >> new cf files daily.
> >>
> >> Does anyone have a vb or javascript version of it? I'm loath to
> >> install perl on my mailserver if there's already another version.
> >
> >Ditto on that - "Add me to your list". Or actually... I missed that thread.
> >I have Perl, so if someone has that script (I missed that thread), please
> >let me know!
> >
> >Thanks.
> >
>
> Here's another than runs under Bourne shell (sh), a portion of which I got
> from an earlier post. The interactive part after the LINTing could be
> modified to use with cron because it will abort if not given a 'yes' within
> 30 secs. A lot less code......
>
> START-----------------------------------------------------------
> #!/bin/sh
> MOVE="bigevil.cf 99_FVGT_Tripwire.cf backhair.cf chickenpox.cf weeds_2.cf
> evilnumbers.cf antidrug.cf"
>
> # List of files to grab
> files="
> http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf
>
> http://www.merchantsoverseas.com/wwwroot/gorilla/99_FVGT_Tripwire.cf
> http://www.emtinc.net/includes/backhair.cf
> http://www.emtinc.net/includes/chickenpox.cf
> http://www.emtinc.net/includes/weeds_2.cf
> http://www.yackley.org/sa-rules/evilnumbers.cf
> http://mywebpages.comcast.net/mkettler/sa/antidrug.cf
> "
> # Save backup of current set of rules
> /bin/cp -fv ${MOVE} /usr/local/etc/mail/save
>
> # change to the spamassassin config directory
> cd /usr/local/etc/mail/spamassassin
>
> # Grab all of the requested files
> restart=0
> for file in $files; do
> if [ "$file" != "" ]; then
> wget -Nv "$file" 2>&1 | grep saved
> # Do we want SA to restart?
> if [ $? = 0 ]; then
> restart=1
> fi
> fi
> done
>
> # Restart spamassassin
> if [ $restart = 1 ] ; then
> cd /usr/local/etc/mail/spamassassin
> /usr/local/bin/spamassassin --lint
> get_yes_no() {
> while true
> do
> echo -n "$1 (Y/N) ? "
> read -t 30 a
> if [ $? != 0 ]; then
> a="No";
> return;
> fi
> case $a in
> [Yy]) a="Yes";
> return;;
> [Nn]) a="No";
> return;;
> *);;
> esac
> done
> }
>
> get_yes_no "Do you want to continue......"
>
> [ $a = 'No' ] && exit 1
>
> echo ".....starting NOW!............"
> /usr/local/bin/spamass
> echo "Restarted SpamAssassin"
> fi
> END-----------------------------------------------------------
>
> Best regards,
> Jack L. Stone,
> Administrator
>
> Sage American
> http://www.sage-american.com
> jacks@sage-american.com
>
>