> So what I am trying to do is to "clean" out the junkmail folders for
> all the users to only keep the past 7 days in there (maybe less) So
> I need to remove messages by date out of the junkmail.mbx files...
Two batch files, ITERATE.BAT and EXPIRE.BAT:
ITERATE.BAT
-----------
c:
CD c:\imail
FOR /F %%I IN ('DIR /S /B junkmail.mbx') DO CALL expire.bat %%I
-----------
EXPIRE.BAT
----------
FOR /F %%J IN ('echo %1') DO MOVE /Y %%~dpnJ.uid c:\imail\exptemp
FOR /F %%J IN ('echo %1') DO MOVE /Y %%~dpnJ.mbx c:\imail\exptemp
IMMSGEXP -tc:\imail\exptemp -d7
IF EXIST %1 REN %1 %1.new
FOR /F %%K IN ('echo %1') DO MOVE /Y c:\imail\exptemp\*.* %%~dpK
IF EXIST %1.new COPY /Y /B %1+%1.new %1
IF EXIST %1.new DEL %1.new
----------
Adjust for and T-E-S-T in your environment. Let me know if you have
any questions. Though the files account for most of the possible
overlap between the batch process and delivery to the active mailbox
(through the concatenation of .mbx and .new), you might prefer the
still safer method of running the batch with SendName temporarily
renamed to a dummy, then starting some queue runs directly after, if
you can spare the pause in overall delivery.
-Sandy
---
[This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]
---
This E-mail came from the Declude.JunkMail mailing list. To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail". The archives can be found
at http://www.mail-archive.com.