Sandy,
Just to double check (getting ready to run this script), it will only run
against mailboxes called "junkmail" if found under the IMail folder? I know this is
probably a crazy question, but I wanted to make 'extra' certain it wasn't gonna touch
any other mailboxes besides those. I thought it was a given just by it meeting the
requirements of the first script. Thanks for the aid.
Keith
-----Original Message-----
From: Sanford Whiteman [mailto:[EMAIL PROTECTED]]
Sent: Thu 1/16/2003 1:12 AM
To: Keith Johnson
Cc:
Subject: Re[4]: [IMail Forum] Remove mail after X # of days
> If you don't mind, could you walk through the script to explain what
> each line does. I understand it until the .new section. I appreciate
> you posting the script, we are looking for the exact same thing for
> our customers. Thank you for your time and effort.
You're welcome.
Here's a commented version:
EXPIRE.BAT
----------
FOR /F %%J IN ('echo %1') DO MOVE /Y %%~dpnJ.uid c:\imail\exptemp //move
index to working folder
FOR /F %%J IN ('echo %1') DO MOVE /Y %%~dpnJ.mbx c:\imail\exptemp //move
mailbox to working folder
C:\IMAIL\IMMSGEXP -tc:\imail\exptemp -d21 //run
expiry utility
IF EXIST %1 REN %1 %1.new //if
new messages delivered during expiration, reserve new messages in separate mailbox to
prevent overwriting
FOR /F %%K IN ('echo %1') DO MOVE /Y c:\imail\exptemp\*.* %%~dpK //move
index and mailbox back to original location
IF EXIST %1.new COPY /Y /B %1+%1.new %1 //if
new messages, concatenate old and new mailboxes under old name (UID will recreate at
next access)
IF EXIST %1.new DEL %1.new
//delete new message mailbox
----------
-Sandy
To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
<<winmail.dat>>
