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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with Inetpub/mailroot/badmail

Status
Not open for further replies.

Huevo

IS-IT--Management
May 13, 2005
14
0
0
US
I am having some problems with this directory. I don't have exchange server. We have internet mail. It still seems to fill up and cause our drive to fill up to capacity. I have tried deleting some of the files in this directory (.bdp, .bdr, .bad) through the command prompt. This used to do the trick to help maintain disk space. Today it doesn't seem to be working. What can I do?
 
I use a script to autodelete files in that folder older than however many days I want.

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
Dim oSubFolder

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

Set oFolder = Nothing
Set fso = Nothing

I hope you find this post helpful.

Regards,

Mark
 
I don't have Exchange server running. Will this script still work?
 
The script has nothing to do with Exchange, it just deletes files from whatever folder you specify in the path. Run the script as a scheduled task to have it run once a day to keep those files down to a manageable level.

I hope you find this post helpful.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top