My server was infected by the bug bear virus and I have loads of spam mails on my server. Most of which have even been delivered to my users. I would now like to delete these mails from my users mailboxes. I cannot think of any way other than to log into each user id and then physically delete each mail. can any one suggest me any way out. I have around 300 users to clear up and I am right now just at the 15th user.
I need help desparately.
Thanx in advance.
Subject: Delete E-mail
First, stop this from happening again. Create up a Mail Rule on the server (Messaging Configuration) to block any attachment whose name contains EXE, COM, BAT, PIF, SCR, JS, VBS, and anything else you don’t want people getting.
I would strongly urge you to install virus protection on the clients that covers Notes. We use Norton Antivirus Corporate Edition and it will scan attachments before the message is even opened or viewed in the preview pane and take care of viruses.
Cleaning up the mess may be easier than you think, but it could be a nightmare. Did all of the messages come from the same user or is it several? Were they all delivered in a specific timeframe or has it been multiple days?
In an nutshell you can create a NotesView from the ($Inbox) folder, then step through it and determine whether you need to delete the message. If you know the timeframe and the user who sent the message you can use those as the main criteria for deleting stuff. Otherwise you’ll need to check each document fo attachments, and each attachment and see if it ends in EXE and then delete the ones that do.
If you need more specific code let me know and I’ll try to pull something together for you.
– Charles
Subject: RE: Delete E-mail
Well chief, as I said I am going to need all the help that I can. To be more specific I know the email id and the specific subject of the infected mails. Hope this is of some use to you to help me. hehehehe.
Mel
Subject: RE: Delete E-mail
Oh, if you know the specific user and subject it shouldn’t be too hard at all. I’ll show you one way to do it here, with a few caveats.
First, I am assuming you would put this code into a button and e-mail it to your users, which is why I’m using CurrentDatabase rather than trying to loop through all the mail databases on the server. If you want to loop through all the mail databases that’s up to you to figure out, I’ve never done it.
Second, this will delete EVERYTHING with the subject you specify. Use this with caution.
Last, I also wouldn’t recommmend having all 300 people try to run it at the same time.
Dim nSession As NotesSession
Dim nDB As NotesDatabase
Dim nDocs As NotesDocumentCollection
Set nSession = New NotesSession
Set nDB = nSession.CurrentDatabase
Set nDocs = nDB.Search(|Subject = “whatever it is”|,Nothing,0)
Call nDocs.RemoveAll(True)
Set nSession = Nothing
Set nDB = Nothing
Set nDocs = Nothing