Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BadMail Folder 2

Status
Not open for further replies.

DColcl

MIS
Sep 22, 2003
436
US
On my Norton Antiv has found an infected email that was placed, by Exchange 2k3 I presume, in a folder called Badmail.

I went to this folder and found over 14k pieces of mail. Can I just delete all these "bad" emails?

I noticed that the folder that contains the "badmail" folder is in a folder called "vsi 1". Will someone take the time to explain to me what VSI 1 means?

Thank you so much for your advise and help.


Danny
 
Yes you can..in fact MS has a maintanance script that does this. Let me locate it..
 
I do much the same thing with a script I wrote. Only difference is that I set mine to run as a daily task using scheduled tasks. With my script, I set the date for how long I want the messages to hang around. This gives me the option to restore a message if I need to.

The following script will delete bad maiil older than 15 days.

Code:
'==========================================================================
'
' VBScript Source File -- 
'
' NAME: CleanBadMail.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL   : [URL unfurl="true"]http://www.thespidersparlor.com[/URL]	
' Copywrite (c) 2003 All rights reserved
' DATE  : 09/10/2003
'
' COMMENT: 
'
' This script will list all filtered and quarantined SPAM mail, check that 
' the files are more than 30 days old and then delete them.
' This file is to be scheduled to run each day.
'=====================================

Path1 = "E:\Program Files\Exchsrvr\Mailroot\vsi 1\BadMail"

Dim fso 
Dim oFolder
Dim oFile

  Set fso = createobject("Scripting.FileSystemObject")
  
   Set oFolder = fso.GetFolder(Path1)
  
  For Each oFile In oFolder.files
   	If DateDiff("d", oFile.DateCreated,Now) > 15 Then
    	oFile.Delete True
    End If
  Next


Set oFolder = Nothing
Set fso = Nothing

I am not positive but I think the VSI stands for Virtual Server Interface. The acronym isn't important. You just need to know that this folder holds the badmail, cache and pickup directories and if you install IMF it also will hold the UCEArchive folder too. Were you to see a message in badmail or UCEArchive that you wanted to get delivered, you would just need to move the message file to the Pickup folder.

I hope you find this post helpful.

Regards,

Mark
 
say, I'm going to copy your script and do that now.

Danny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top