JSEMTS搜尋引擎
 

Updating Sophos IDE files Automatically
SUPPORT > KNOWLEDGE BASE > KNOWLEDGE BASE ARTICLE




Support


Knowledge Base Article

Updating Sophos IDE files Automatically
More like this


Article ID: KB157
The information in this article applies to MailMarshal SMTP and was
first reported on March 20, 2001.
This article applies to the following versions: 3.x,4.x, 5.x


DESCRIPTION

Sophos AntiVirus post new IDE files on their website when new
viruses have been identified. If you subscribe to the Sophos email
notification service, you will receive a notification email whenever
a new IDE is available. You can then configure MailMarshal to
automatically run a batch file to download the new IDE files when
the Sophos notification is received.
The following knowledge base article is done in two sections, this
is due changes made to MailMarshal. In later versions of MailMarshal
you do not need to restart the MailMarshal Engine service, this has
been reflected in the first part.
MailMarshal 4.2.x, 5.x
MailMarshal 4.1.x and earlier
MailMarshal 4.2.x, 5.x
1) Subscribe to the Sophos email notification service.
To do this, refer to the Sophos website
(www.sophos.com/virusinfo/notifications).
2) Install the SGET utility.
The SGET utility can be downloaded from the 'Downloads' section on
the Sophos website. The SGET utility is also available from the
'Tools' folder on the Sophos CD.
3) Create a batch file to download and install the latest IDE files.

This outlines the batch file needed to download and install the
updated IDE's.
Save this file as ide.cmd in your MailMarshal install directory.
@echo off

Rem You must set the MailMarshal and Sophos install directories
below
Rem as appropriate for your installation.
Rem Enter the computer name or login you want notified if an error
occurs

set MailMarshalInstall=C:\Program Files\Marshal Software\MailMarshal
set SophosInstall=C:\Program Files\Sophos SWEEP for NT
set Notifyuser=Administrator


set logfile=%MailMarshalInstall%\SophosUpdate.txt
set detailfile=%MailMarshalInstall%\SophosErrorDetails.txt
del /F "%detailfile%"
echo ----------------------------- >> "%logfile%"

echo Sophos update process starting %date% %time% >> "%logfile%"
Rem *** Delete old ide zip file
del /F "%SophosInstall%\ides.zip" > NULL 2>&1
echo Deleting Existing IDES %date% %time% >> "%logfile%"

REM *** Download latest ide zip from from Sophos website
cd %SophosInstall%
set Phase=Fetching ides from Sophos
SGET http://www.sophos.com/downloads/ide/ides.zip 2> "%detailfile%"
if errorlevel 1 goto Failed
echo Downloading IDES %date% %time% >> "%logfile%"

set Phase=Testing downloaded ides.zip
"%MailMarshalInstall%\unzip.exe" -t ides.zip > "%detailfile%" 2>&1
if errorlevel 1 goto Failed
echo Unpacking new IDES %date% %time% >> "%logfile%"

set Phase=Unpacking ides.zip
"%MailMarshalInstall%\unzip.exe" -o ides.zip >> "%logfile%" 2>
"%detailfile%"
if errorlevel 1 goto Failed
echo Unpacking Complete %date% %time% >> "%logfile%"

echo Stopping Sophos services %date% %time% >> "%logfile%"

REM *** Stop Sophos services
net stop "SWEEP for Windows NT"
net stop "SWEEP for Windows NT Network"

echo Starting Sophos services %date% %time% >> "%logfile%"

set Phase=Starting Sophos Services
REM *** Start Sophos services
net start "SWEEP for Windows NT Network" > "%detailfile%" 2>&1
if errorlevel 1 goto Failed
net start "SWEEP for Windows NT" > "%detailfile%" 2>&1
if errorlevel 1 goto Failed
echo Update complete %date% %time%. >> "%logfile%"

exit /b

:Failed
echo Failed: %Phase% Error Number is %errorlevel% >> "%logfile%"
start net send %Notifyuser% SophosUpdate error has occured
Echo ******Error Details %date% %time%********** >> "%logfile%"
Type "%detailfile%" >> "%logfile%"
Echo ******************************************* >> "%logfile%"

Notes:
This example uses UNZIP to extract the Sophos IDE.zip file. This
is located in the MailMarshal Install directory on the MailMarshal
server.
The install path for MailMarshal in the example is set to
C:\Program Files\Marshal Software\MailMarshal and path for Sophos
is C:\Program Files\Sophos SWEEP for NT. These are the current
default install directories for these programs, if you have
anything different you will need to adjust the script accordingly.

The script will also write information to a SophosUpdate.txt file
located in the MaiMarshal install directory. An example of
information recorded is:
-----------------------------
Sophos update process starting Wed 20/11/2002 16:12:44.60
Deleting Existing IDES Wed 20/11/2002 16:12:44.64
Downloading IDES Wed 20/11/2002 16:12:55.75
Unpacking new IDES Wed 20/11/2002 16:12:55.85
Archive: ides.zip
inflating: peido-a.ide
inflating: opaservg.ide
inflating: advers-a.ide
inflating: bdooraml.ide
inflating: oror-b.ide
inflating: dload-bo.ide
inflating: braid-a.ide
inflating: oror-fam.ide
inflating: zasil-a.ide
inflating: likun.ide
inflating: merkur-a.ide
inflating: opaservf.ide
inflating: nethf-c.ide
inflating: opaserve.ide
inflating: opaservc.ide
inflating: netdex-a.ide
Unpacking Complete Wed 20/11/2002 16:12:56.14
Stopping Sophos services Wed 20/11/2002 16:12:56.14
Starting Sophos services Wed 20/11/2002 16:13:01.81
Update complete Wed 20/11/2002 16:13:12.25.
In the event of the update procedure not correctly completing
update additional information will be recorded in the
SophosErrorDetails.txt file and a net popup send to specified
user/computer.
4) Create a Text Censor Script to detect when the Sophos
notification email is received.

5) Set up an External Command to run ide.cmd file.

Notes:
As shown above you will have to raise the timeout value for this
external command. If you do not you may find the Sophos email
notifications get deadlettered because of timeout errors and the
updates do not finish successfully.
6) Set up a rule to run the External Command when the Text Censor
Script is triggered.


MailMarshal 4.1.x and Earlier
1) Subscribe to the Sophos email notification service.
To do this, refer to the Sophos website
(www.sophos.com/virusinfo/notifications).
2) Install the SGET utility.
The SGET utility can be downloaded from the 'Downloads' section on
the Sophos website. The SGET utility is also available from the
'Tools' folder on the Sophos CD.
3) Create a batch file to download and install the latest IDE
files.
In this example, we will call the batch file ide.cmd. The batch
file should look something like this: -
@echo off
REM *** Set the MailMarshal and Sophos install directories. Note
you should modify these to reflect your own installation
directories ***
set MailMarshalInstall=C:\Program Files\Designer
Technology\MailMarshal3
set SophosInstall=C:\Program Files\Sophos SWEEP for NT
REM *** Delete old ide files and ide zip file ***
del "%SophosInstall%\*.ide"
del "%SophosInstall%\ides.zip"
REM *** Download latest ide zip from from Sophos website ***
cd "%SophosInstall%"
SGET http://www.sophos.com/downloads/ide/ides.zip
REM *** Stop the MailMarshal and Sophos services ***
net stop "MailMarshal Engine"
net stop "SWEEP for Windows NT"
net stop "SWEEP for Windows NT Network"
REM *** Extract the ide zip file ***
cd "%SophosInstall%"
"%MailMarshalInstall%\unzip.exe"-o ides.zip
REM *** Start the MailMarshal and Sophos services ***
net start "SWEEP for Windows NT Network"
net start "SWEEP for Windows NT"
net start "MailMarshal Engine"
Notes:
This example uses UNZIP to extract the Sophos IDE.zip file. This
is located in the MailMarshal Install directory on the MailMarshal
server.
The install path in this example is for releases up to 4.1 or if
you have upgraded from an earlier version. If it is a new install
of 4.2 then the directory will be "C:\Program Files\Marshal
Software\Mailmarshal\"
From MailMarshal 4.2.0.18 onwards, it is no longer necessary to
stop and start the MailMarshal engine service in the above batch
file.
4) Create another batch file to run IDE.cmd.
In this example we will call the batch file RunIDE.cmd. This is the
batch file that will be run by MailMarshal as an external command.
If you simply run IDE.cmd as an external command, when the
MailMarshal engine service is stopped, the batch file will terminate
and the update will not complete. Creating a second batch file
enables IDE.cmd to run as a separate process, preventing it from
terminating when the engine is stopped. The batch file should look
similar to this: -
start cmd.exe /C "C:\Program Files\Designer
Technology\Mailmarshal3\IDE.cmd"
5) Create a Text Censor Script to detect when the Sophos
notification email is received.

6) Set up an External Command to run RunIDE.cmd.

7) Set up a rule to run the External Command when the Text Censor
Script is triggered.




STATUS
Informational Article


Last Reviewed: February 11, 2002
Article ID: KB157



Print Article
Email Article Reference


Privacy policy | Email: Info@marshalsoftware.com
This web site and its contents are copyright to NetIQ Corporation
1997-2003







搜尋引擎讓我們程式搜尋結果更加完美
  • 如果您覺得該文件有幫助到您,煩請按下我
  • 如果您覺得該文件是一個一無是處的文件,也煩請按下我

  • 搜尋引擎該文件您看起來是亂碼嗎?您可以切換編碼方式試試看!ISO-8859-1 | latin1 | euc-kr | euc-jp | CP936 | CP950 | UTF-8 | GB2312 | BIG5 |
    搜尋引擎本文件可能涉及色情、暴力,按我申請移除該文件

    搜尋引擎網址長?按我產生分享用短址

    ©2024 JSEMTS

    https://tw.search.yahoo.com/search;_ylt=A8tUwZJ2QE1YaVcAUmFr1gt.;_ylc=X1MDMjExNDcwNTAwMwRfcgMyBGZyA3lmcC10LTkwMC1zLXR3BGdwcmlkAwRuX3JzbHQDMARuX3N1Z2cDMARvcmlnaW4DdH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U4NSVFNSU5QyU5OAR0X3N0bXADMTQ4MTQ1Nzk3Ng--?p=%E6%AD%A1%E6%AD%8C+%E5%B0%88%E6%83%85%E5%9C%98&fr2=sb-top-tw.search&fr=yfp-t-900-tw&rrjfid=9912923 https://tw.search.yahoo.com/search;_ylt=A8tUwYgkQU1YcXoAUE9r1gt.;_ylc=X1MDMjExNDcwNTAwMwRfcgMyBGZyA3lmcC10LTkwMC10dwRncHJpZAMxWU5tY2FYMVFGQ2ZvUXZGN1N0bzVBBG5fcnNsdAMwBG5fc3VnZwMwBG9yaWdpbgN0dy5zZWFyY2gueWFob28uY29tBHBvcwMwBHBxc3RyAwRwcXN0cmwDBHFzdHJsAzQ4BHF1ZXJ5AyVFNiVBRCVBMSVFNiVBRCU4QyUyMCVFNSVCMCU4OCVFNiU4MyU4NSVFNSU5QyU5OAR0X3N0bXADMTQ4MTQ1Nzk3Ng--?p=%E6%AD%A1%E6%AD%8C+%E5%B0%88%E6%83%85%E5%9C%98&fr2=sb-top-tw.search&fr=yfp-t-900-tw&rrjfid=1577419 https://tw.search.yahoo.com/search;_ylt=A8tUwYgkQU1YcXoAUE9r1gt.;_ylc=X1MDMjExNDcwNTAwMwRfcgMyBGZyA3lmcC10LTkwMC10dwRncHJpZAMxWU5tY2FYMVFGQ2ZvUXZGN1N0bzVBBG5fcnNsdAMwBG5fc3VnZwMwBG9yaWdpbgN0dy5zZWFyY2gueWFob28uY29tBHBvcwMwBHBxc3RyAwRwcXN0cmwDBHFzdHJsAzQ4BHF1ZXJ5AyVFNiVBRCVBMSVFNiVBRCU4QyUyMCVFNSVCMCU4OCVFNiU4MyU4NSVFNSU5QyU5OAR0X3N0bXADMTQ4MTQ1Nzk3Ng--?p=%E6%AD%A1%E6%AD%8C+%E5%B0%88%E6%83%85%E5%9C%98&fr2=sb-top-tw.search&fr=yfp-t-900-tw&rrjfid=2616916 https://tw.search.yahoo.com/search;_ylt=A8tUwZJ2QE1YaVcAUmFr1gt.;_ylc=X1MDMjExNDcwNTAwMwRfcgMyBGZyA3lmcC10LTkwMC1zLXR3BGdwcmlkAwRuX3JzbHQDMARuX3N1Z2cDMARvcmlnaW4DdHcuc2VhcmNoLnlhaG9vLmNvbQRwb3MDMARwcXN0cgMEcHFzdHJsAwRxc3RybAM4NARxdWVyeQMlRTglQjYlODUlRTUlOEYlQUYlRTYlODQlOUIlRTclOUElODQlRTUlQUYlQjYlRTUlQUYlQjYlMjAlRTglODMlQTElRTUlQUUlODklRTUlQTglOUMEdF9zdG1wAzE0ODE0NTc3OTM-?p=%E8%B6%85%E5%8F%AF%E6%84%9B%E7%9A%84%E5%AF%B6%E5%AF%B6+%E8%83%A1%E5%AE%89%E5%A8%9C&fr2=sb-top-tw.search&fr=yfp-t-900-s-tw&rrjfid=1920301