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

Mail.box is 350mb

Status
Not open for further replies.

mizzy

IS-IT--Management
Jun 28, 2001
277
AU
Hi there,

I open mail.box every day(on the SMTP server) and remove loads of dead mail. All the dead mail is virus infected with invalid user names.

I assumed that when I deleted the dead mail that the size of mail.box would get reduced after it was compacted. However what I notice is that the %Used is at 97% so compacting will not achieve anything.

So it looks like that even though I'm deleting the DEAD mail its not actually being removed and compact is not having any effect.

Any ideas how to solve the problem (apart from removing the mail.box and restarting)

Regards
 
All I do is delete mail.box and restart the Domino server. It's quick and easy and I only do it every couple of months. It's quicker than stuffing around trying to compact it.

Cheers!
 
Hello,

You can also quick the router and smtp tasks, delete mail.box and then start the tasks.

Rgds,

John
 

Thanks guys,

I've done as you advised.
See the attached agent code for removing the dead mail automatically. I do not use it myself but if you are interested here it is.


Sub Initialize

On Error Goto processError

Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim docRemove As NotesDocument
Dim item As NotesItem
Dim ans As String

#1 ===> Set db = New NotesDatabase("NotesSRV1/IT/org/US", "mail.box")
Set view = db.GetView("Mail")
Set doc = view.GetFirstDocument

x = 0

Do While Not doc Is Nothing
#2 ===> If doc.RoutingState(0) = "DEAD" And Right(doc.DeadFailureReason(0),26)="public Name & Address Book" Then
Set docRemove = doc
Set doc = view.GetNextDocument(doc)
' Messagebox "Found a Dead Record, 'Name not in public Names & Address Book ...'" + Chr(13)+ Chr(13) + "Subject: " + docremove.subject(0) + Chr(13)+ Chr(13) +"To: " + docremove.sendto(0)
Call docRemove.Remove(1)
x = x + 1
Else
' Messagebox "Rounting state = " + doc.RoutingState(0) + Chr(13) + Chr(13) + "Failure Reason = " + doc.FailureReason(0)+ Chr(13) + Chr(13) + "Dead Failure Reason = " + doc.DeadFailureReason(0)
Set doc = view.GetNextDocument(doc)
' ans = Inputbox$("Continue","Yes / No ?","Yes")
' If Ucase(ans) <> "YES" Then
' Goto ExitOut
' End If
End If
Loop

' Don't need these they were defined above

' Dim session As New NotesSession
' Dim db As NotesDatabase
' Dim doc As NotesDocument

Set db = session.CurrentDatabase
Set doc = New NotesDocument( db )
doc.Form = "Memo"
doc.SendTo = "Domenic DiSorbo"
doc.Subject = "CleanUp NotesSRV1 Stats found " + Cstr(x) + " Documents that have been deleted!"
Call doc.Send( False )

ExitOut:
Exit Sub

processError:
Dim ErrorDoc As NotesDocument
Set ErrorDoc = New NotesDocument( db )
ErrorDoc.Form = "Memo"
ErrorDoc.Subject = session.CurrentAgent.Name & " agent error in " & db.FilePath
ErrorDoc.Body = "Error " & Err & ": " & Error$ + " at line " & Erl
Msgbox session.CurrentAgent.Name & " agent error in " & db.FilePath & Chr(13) & "Error " & Err & ": " & Error$ + " at line " & Erl
Call ErrorDoc.Send( False, "Administrators" )
Exit Sub

End Sub



Regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top