Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a spam filter that will mark all emails it thinks are spam as ** SPAM Email Title Here **

I'd like to still send these to the users but make a rule that if ** SPAM is in the title to send it to the Junk mail folder.

Is there a way I can do this globally for all 2000+ users in Exchange 2010? Google has failed me(or I failed Google :P).

share|improve this question

From quick look this should be possible with some powershell scripting :

In a nutshell, you would need to pull the users list and then iterate through it using Set-InboxRule cmdlet

share|improve this answer
Pretty cool procedure, I found a much simpler way, however :) – Jeff Dec 27 '11 at 20:59
up vote 0 down vote accepted

I found an easy way to do this.
Under Organizational Configuration -> Transport Rules
You can create a new rule that
If ** SPAM is in the Title, set the spam confidence level to 9.
This puts all of these in the proper Junk folder.

I did end up writing

Get-Mailbox | foreach { 
Remove-Inboxrule -Mailbox datacore -Identity “SpamBlocking”
New-InboxRule SpamBlocking -Mailbox $_.Name -SubjectContainsWords '*** SPAM' -MoveToFolder '$_:\Junk E-Mail' -MarkImportance 'Low'

That should also work but I never ended up testing it.

share|improve this answer

Your Answer


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.