In the latest version of IMail, 8.14.x they've updated the ISplCln.exe
application so that it actually does what the command line parameters say it
does (previous to this update if you specified one type of cleaning to do,
it would do both anyway, thus throwing your LOGS away when all you wanted
was to clean up the broken files).

Well, before that update came out I wrote this little .cmd script to clean
it up for me.

Not as verbose as Matt's contribution, but hopefully simple enough to be
darn obvious anyway.

I schedule it at 5 AM every day with the AT command.  I prefer using AT to
Scheduled Tasks.

at 5 AM /every:m,t,w,th,f,sa,su c:\utils\TidyUp.cmd

Andrew 8)

REM This script will tidy up the extra files that accrete on this mailserver.
REM It is scheduled to run via the AT command at 5AM every morning.
REM Oct-13-2004 AC

REM This depends on robocopy, which is a free download in the Microsoft Server 
Resource Kit
REM Change your Declude paths accordingly

REM Delete the orphaned messages in the IMail spool folder
REM ---------------------------------------------------------------------------
if not exist d:\imail\spool\orphans md d:\imail\spool\orphans
del /s /q d:\imail\spool\orphans

REM Clear out the transaction files; these should not take more than 1 day
robocopy d:\imail\spool d:\imail\spool\orphans T*.smd /MOV /LEV:1 /MINAGE:1
robocopy d:\imail\spool d:\imail\spool\orphans _*.~md /MOV /LEV:1 /MINAGE:1
robocopy d:\imail\spool d:\imail\spool\orphans  *.gse /MOV /LEV:1 /MINAGE:1
robocopy d:\imail\spool d:\imail\spool\orphans  *.gsp /MOV /LEV:1 /MINAGE:1

REM Clear out the orphaned message files; these should not take more than 2 days
REM Note that we're not bothering to match up the Q*.smd and D*.smd files, we 
just
REM assume that any files here more than 2 days are broken.
robocopy d:\imail\spool d:\imail\spool\orphans Q*.smd /MOV /LEV:1 /MINAGE:2
robocopy d:\imail\spool d:\imail\spool\orphans D*.smd /MOV /LEV:1 /MINAGE:2
robocopy d:\imail\spool d:\imail\spool\orphans R*.o?? /MOV /LEV:1 /MINAGE:2


REM Clean up the files in the root of C: drive
REM ---------------------------------------------------------------------------

:declog
if not exist c:\declude.log goto spflog
del c:\declude.log
if errorlevel 1 goto declog

:spflog
if not exist c:\spf.log goto spfnone
del c:\spf.log
if errorlevel 1 goto spflog

:spfnone
if not exist c:\spf.none goto quit
del c:\spf.none
if errorlevel 1 goto spfnone

:quit

Reply via email to