Barry, There are some freeware dll's that you can use to do the FTP/wget so you don't have to do the shell. I don't see where you restart/reload the service???
Gary -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barry Porter Sent: Saturday, December 06, 2003 5:35 PM To: [EMAIL PROTECTED] Subject: Re: [SAtalk] bigevil.cf + rsync? - Windows version - sort of All this unix/linux stuff is great and one day I might get round to setting up a mail server on linux. At the moment I am running Mercury/32 on Windows 2000 Server and Gary's script inspired me to write a vb script that could be run with the scheduler to update the file as often as you want under Windows. I'm just learning this stuff, so there are probably more elegent ways of doing this, so if anyone can improve it, please do. '********************************************************* ' VBScript to update bigevil.cf from Chris Santerre's website at: ' http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf ' ' This script requires the windows version of wget from: ' http://www.interlog.com/~tcharron/wgetwin.html ' ' This script also requires the windows version of recode from the ' Win32 Unix utilities that can be found at: ' http://wwweickel.in.tum.de/pub/sw/UnxUtils.html ' ' Copy wget.exe and recode.exe into the %SystemRoot%\system32 folder ' ' ' Edit the paths in the section "Paths to be edited" below to match 'your configuration. ' Also ensure you edit the path in the change format command towards ' the end of the script. ' '********************************************************* ' Variables Dim objFSO, objShell, objFile Dim strFName Dim strFtype Dim strHour Dim strMin Dim strSec Dim strYear Dim strMonth Dim strDay Dim strNewFileName Dim strSApath Dim strSAbackup Dim strBigName ' Creat FileSystemObject Object Set objFSO = CreateObject("scripting.filesystemobject") ' Create WSH Shell Object Set objShell = CreateObject("wscript.shell") ' Create the file name elements strHour = Hour(Now) strMin = Minute(Now) strSec = Second(Now) strYear = Year(Now) strMonth = Month(Now) strDay = Day(Now) strFName = "bigevil_" strFtype = ".cf" ' Create the Date and Time stamped file name strNewFileName = strFName & strYear & strMonth & strDay & "_" & strHour & strMin & strSec & strFtype '********************************************************* ' Paths to be edited strSApath = "d:\perl\etc\mail\spamassassin\" strSAbackup = "d:\perl\etc\mail\backup\" '********************************************************* ' Main ' Get the latest bigevil.cf file from Chris Santerre's site objShell.Run "cmd /c wget -N http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf -O c:\bigevil.cf" ' Don't continue until the Output file exists Do Until objFSO.FileExists("c:\bigevil.cf") WScript.Sleep 20000 Loop ' Apply Date and Time stamped name to new bigevil.cf objFSO.MoveFile "c:\bigevil.cf", "c:\"+strNewFileName ' Make a backup of the current bigevil*.cf file in d:\perl\etc\mail\backup objFSO.CopyFile strSApath & "bigevil*.cf", strSAbackup ' Delete the current bigevil*.cf file in d:\perl\etc\mail\spamassassin objFSO.DeleteFile strSApath & "bigevil*.cf" ' Copy the new bigevil*.cf file to d:\perl\etc\mail\spamassassin\bigevil*.cf objFSO.CopyFile "c:\bigevil*.cf", strSApath ' Clean up C:\ for next time objFSO.DeleteFile "c:\bigevil*.cf" ' Change the format from Unix LF to PC CR-LF format ' Edit the path here to match your configuration objShell.Run "cmd /c recode -v -t ..MSDOS/CR-LF d:\perl\etc\mail\spamassassin\bigevil*.cf" '********************************************************* ' Clear Objects Set objFile = Nothing Set objFSO = Nothing Set objShell = Nothing ' End Script - -- Regards Barry I used to have an open mind but my brains kept falling out. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3-nr1 (Windows XP) iD8DBQE/0oPW3wKVPLs2unURAtdyAJ4pNTanFYNYl6X8Bsf5zoVYv00cbgCfUWFt 5VGNMVPMbwBbQoA6XyyM86A= =EriQ -----END PGP SIGNATURE----- ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk