Exchange 2007 – Blocking Stupid Spammers

So… every once in a while some stupid spammer will harvest our email addresses from our website.  And, chances are this spammer doesn't agree with our Church and proceeds to email us telling us why we suck.  And emails us again.  And again.  And again.  To everyone.  Or many people.  And I get the helpdesk ticket to fix it.

We use MXLogic as our anti-spam processing service – and each person individually could black-list the spammer, but I haven't found the "global" blacklist yet.  It may be there, I just haven't seen it.

UPDATE: Big props to @dszp – I had a major brainfart and forgot this was set in the policies.  See picture below:

Screen shot 2009-12-15 at 9.05.40 PM

Carry on…

But, we run Exchange 2007 – and there are built-in anti-spam technologies.  Let's use those.

Install Anti-spam
On Exchange 2007 – launch the Management Shell (the Powershell stuff) and navigate to the Program Files Microsoft Exchange Server Scripts folder.  We need to do two things:

1) run the "install-AntispamAgents.ps1" script

2) restart the Exchange Transport service

That process looks like this:

Screen shot 2009-12-15 at 2.26.24 PM 

Reject the Spammer
Now launch the Exchange Management Console (the GUI).  Navigate to the Organization Configuration / Hub Transport section.  On the right-hand side you'll see a new tab called "Anti-spam" – click there.

Screen shot 2009-12-15 at 2.38.42 PM

Right-click on Sender Filtering & go to properties.

Screen shot 2009-12-15 at 2.27.37 PM

The "Action" tab lets you choose what to do with the spammer.  I choose "Reject" and it sends back an NDR saying "your email was rejected – stupid spammer" – or something like that.

Click "Add" to Add the spammer's email address (or domain) to the reject list.

Screen shot 2009-12-15 at 2.38.24 PM 

Click OK.  Click Apply.

You're done.

No, really.

Verify the Config
You can verify all this by going back to the Management Shell and running the "get-senderfilterconfig" cmdlet:

Screen shot 2009-12-15 at 2.31.40 PM 

I know, nothing super exciting.  It is a very easy way to block spammers at the Exchange level – if you need to do that.  I did, and learned how to do this today by reading this blog.