If you don’t know what Exchange recipient filtering is, your company may be sending out spam. Many of our customers and friends run Exchange servers, so we like to periodically discuss Exchange best practices. Fortunately, this change is very simple and straight forward to make.
First, a little background. Directory Harvest attacks are extremely common ways for spammers to infiltrate your corporate users’ inboxes. The idea is simple. They connect to your mail server and just start guessing email addresses (e.g. john@, sally@, sales@, etc). They might litterally try thousands of combinations…and why not? They’re not paying for it and have all the time in the world. This is of course very bad news for you. Two problems arise: 1) they will eventually have your entire corporate directory, and 2) all of these lookups can bring your mail server grinding to a halt.
Microsoft decided to address this threat in an unfortunate way. By default, Exchange will Asynchronisly bounce bad recipients. That means instead of telling the sending mail server right away that a recipient doesn’t exist, Exchange says all recipients are valid. According to the idea, spammers are just wasting their time with directory harvest attacks. The server appears to accept ALL recipients for your domain, so the spammer can’t tell the good from the bad addresses. The theory was that since this would be of little value to them, they simply wouldn’t do it. It turns out a little differently in practice.
The problem with this approach is that Exchange must at some point notify the sender that the recipient was not found. So, Exchange generates a NEW email message (called a NDR or Non-delivery Report) and sends it to the sender of the email message. But hold on. What if the spammer didn’t use his REAL email address. In fact, what if he LIED and said the message was coming from email@example.com? Your server just spammed the real victim.
We highly recommend that anyone running a corporate email server invest in top-of-the-line Anti-spam technology. It will pay off a thousand fold in the long run. Most good anti-spam solutions do a reasonable job of limited the impacts of Directory Harvest attacks. But almost all still will allow a sender to try quite a few bad recipeints before shutting them down.
That means that EVERYONE running an Exchange server should consider the following configuration change to limit the impacts of this problem. If you are running Exchange 2003, then you need to add a recipient filter rule:
To configure recipient filtering, follow these steps:
1. Start the Exchange System Manager tool.
2. Expand Global Settings, right-click Message Delivery, and then click Properties.
3. Click the Recipient Filtering tab, click to select the Filter recipients who are not in the Directory check box, and then click OK.
4. When you receive the following message, click OK:
Connection, Recipient, and Sender Filtering must manually be enabled on specific SMTP virtual server IP address assignments as they are not enabled by default. For more information on how to enable any of the above filtering types, read their associated help.
5. Expand Servers, expand your computer, expand Protocols, expand SMTP, right-click Default SMTP Virtual Server, and then click Properties.
6. On the General tab, click Advanced.
7. Click Edit, click to select the Apply Recipient Filter check box, and then click OK three times.
Note If you are running Exchange in a front-end/back-end environment, recipient filtering must be enabled on the SMTP bridgehead server or servers.
If you are on an older version of Exchange, then you are out of luck (sorry). You might want to consider migrating to a business class hosted email solution and let all of this become someone else’s problem. Alternatively, you can use a gateway email solution which rejects bad recipients syncronously via it’s own internal directory, or via LDAP against your Active Directory.
MxToolBox customers who need help with this issue should contact our support team. We’re happy to walk you through the options.