Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So, we had an errant program kick off about 15,000 emails to our users. I have our spam filters now blocking these on the edge until that gets resolved, but now I would like to clean our our users' mailboxes for them. Is there anyway with Exchange 2007 to remove all emails with certain text in the subject line? It would need to be a partial match because the subject changes slightly for each email.

I am trying to do this with Forefront's manual scan job + content filter, but it does not seem to like partial matches on the subject.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

I haven't used it myself, but the export-mailbox PowerShell command should be what you need using the -Deletecontent option along with the -SubjectKeywords option. Here's the link from MSDN on export-mailbox. I also found this blog post with some good information.

Sample:

Get-Mailbox | Export-Mailbox -SubjectKeywords “Text to block” -Deletecontent -confirm:$false -whatif (omit -whatif to actually run the command.)

share|improve this answer
add comment

use the powershell commands, I don't have a exchange 2007 server I can test this on but I've done this in the past I'll hunt around for the correct scriptlet. tr

share|improve this answer
    
yep Joe nailed it! –  tony roth Mar 25 '10 at 22:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.