Exchange 2003 Meeting Requests v. Exchange 2007

I’ve been working with a client who has been reporting emails that haven’t been going through to some recipients.  He was getting frustrated because he couldn’t reliably send to personal or professional contacts.

He sent:

More failures. This was to our accountant and my fiancée. It took two days to receive this failure notice. I will forward the originals.  Have you figured out what is going on or how to fix this?

I replied:

The NDR comes back in 48 hours because the mail server attempts to connect to the other server for 2 days.

Email was never designed to be 100% timely, it was designed to deliver mail come hell or high water; so if there’s a problem with the server you’re trying to send to, our server tries and tries again, hoping the problem is fixed within 48 hours.  If it is not, our server stops trying, rejects the message and lets you know.

4.4.7 errors usually indicate some issue with the recipient’s server (from: http://support.microsoft.com/kb/284204):

Numeric Code: 4.4.7

Possible Cause: The message in the queue has expired. The sending server tried to relay or deliver the message, but the action was not completed before the message expiration time occurred. This NDR may also indicate that a message header limit has been reached on a remote server or that some other protocol timeout occurred during communication with the remote server.

Troubleshooting: This code typically indicates an issue on the receiving server. Verify the validity of the recipient address, and verify that the receiving server is configured to receive messages correctly. You may have to reduce the number of recipients in the header of the message for the host that you are receiving this NDR from. If you resend the message, it is placed in the queue again. If the receiving server is on line, the message is delivered.

Problem was, I didn’t see where the recipient’s server was rejecting any emails in the logs; nor could I see why the message was getting hung up.

So, using mails to sent to his fiancee on 2/24 as a test, I found that all mails sent to her were successfully delivered EXCEPT the calendar invites / meeting requests.  So, I had to question why  that was.  Obviously, sending to that mail server wasn’t the issue; the user was not blacklisted or anything, but something was getting hung up.

The SMTP logs didn’t show anything out of the ordinary, so I figured the items were never even making it into the queue.  Using Message Tracking, we were able to verify that it never hit the queue.  It got stuck in “Message Routed and Queued For Remote Delivery”

And then two days later, the NDR was generated.

So, further investigation made me ask this question:  Are the people bouncing messages using Exchange 2007? I couldn’t tell from one of the servers (custom SMTP banner) if it was even running Exchange, but the other said “220+domain.local+Microsoft+ESMTP+MAIL+Service+Version:+2.0 0 0 71 0 47 SMTP.”

What made me ask this question was this note from Microsoft we turned up after some research:

Consider the following scenario. A Microsoft Exchange Server 2003 organization and a Microsoft Exchange Server 2007 organization exchange communications by using SMTP. An Exchange 2003 user organizes a meeting and then sends a meeting request to an Exchange 2007 user. Additionally, the Exchange 2007 user accepts the meeting request. Then, the meeting organizer uses Microsoft Office Outlook to send a meeting update message or a meeting cancellation message to the Exchange 2007 user.

In this scenario, the meeting update message or the meeting cancellation message is not delivered to the Exchange 2007 user. Instead, the meeting update message or the meeting cancellation message goes into the SMTP retry queue. If an administrator tries to open the message in the Exchange System Manager console, the administrator may receive the following error message: […]

After some time, the sender of the meeting update may receive the following NDR:

Your message did not reach some or all of the intended recipients.
Subject: test message
Sent: 8/20/2008 11:44 AM
The following recipient(s) could not be reached: user@domain.com on 8/20/2008 11:34 PM
Could not deliver the message in the time limit specified. Please retry or contact your administrator. <server.domain.com #4.4.7>

So, it looked promising — the article mentioned both calendar invites and error 4.4.7 along with the message getting stuck in the queue, but the initial scenario is not quite correct (it seems to assume the Exchange 2007 recipient got the request and accepted it; something that’s not happening here).

The Microsoft article mentioned a hotfix, which we downloaded and applied.

After the hotfix was applied, I sent a test calendar entry to the client and his fiancee (whose address which was giving us a hard time) and lo and behold, the invite went through:

(In playing with the Message Tracker, I noticed the time was being reported an hour fast.  Turns out, there’s a hotfix for that, too.)

Making Exchange Public Folders Store Mail Items as E-Mail

I keep coming up against this, and I keep forgetting it, so I figured I’d write it down here for all of our benefit.

Exchange 2003 allowed us to easily mail enable public folders, so something sent to info@domain.invalid would go to a public folder where any number of staff could monitor the mailbox.

However, by default, the mail is stored in the Public Folder as a NOTE and not an E-MAIL (for the geeks in the audience IPM.POST vs. IPM.NOTE)

To make the public folder store incoming mail as emails, we need to make a quick registry change. This is all outlined in MS KB 817809.

Go to

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Public-<GUID>

And create (or edit) the key:

Value name: Incoming defaults to IPM.Note
Value type: DWORD
Value data: 1

Setting the value to 1 (true) stores things as IPM.NOTE (which is what we want). Setting the value to 0 sets it back to saving things as a post.

Handling Bogus Domains using SMTP Connectors in Exchange

Talking about SMTP Connectors in an earlier post got me to thinking of another way we use the SMTP Connectors in Exchange.

A client has a (horribly behaved) legacy piece of software that, when faced with a customer with no email address on file, sends an email to an address it makes up in a legitimate domain. So, for a long time, they were bombarding this innocent third party domain with mail that was destined to go nowhere.

This was eating bandwidth, processing cycles and the like, so we tried to put an end to it by appealing to the developers. They were not interested in fixing the old program, it would continue to spit out its bogus mail.

We created an SMTP Connector in Exchange to handle delivery to the legitimate domain. (It should be noted that the domain probably wasn’t legit when the program was written, but with the .com explosion, it became legit. It’s also not a domain anyone would be sending mail to in the normal course of business… it’s not like this is for AOL.COM or anything…)

We set the connector so in the “address space” we listed our desired domain. We checked off “Forward all mail thru this connector to the following smart hosts”

… and this is where we get tricky …

… we put a non-routable IP address in the smart host field. (And remember to enclose the IP address in brackets – i.e., [10.99.99.88] )

On the Delivery Options tab, when it asks when it should deliver, we tell it to “Never Run”

And that does the trick. We no longer pester the legit domain, we don’t eat any bandwidth, everyone’s happy.

Bulk Deleting Outbound SMTP Queues in MS Exchange

A client is constantly getting hit with email attacks, and one such attack flooded the Exchange box with a couple hundred bogus NDRs which were trying to be delivered.

Removing these queues by hand is a royal pain, so I recalled a simple little kludge that would get all the bad mail into one queue so it could be deleted in one fell swoop instead of having to right click on every queue and choose “Delete all messages (No NDR)”

The steps are laid out pretty explicitly in a KB article from Microsoft, so I won’t go into great detail here. I’ll just give you the overview.

All of the following steps are done using the Exchange System Manager. I did this using Exchange 2000, it should work for Exchange 2003. I haven’t played with 2007 at all — three servers?!? — so I have no clue if this is still how it works.

First, you need to make sure all your good mail is out of the queue, so I tend to do this at 3 AM when I know that it’s been a few hours since anyone has tried to send any out-of-office mail and anything I’m going to find in the queue is crap. YMMV.

Next, stop the SMTP Virtual Server for the site.

Create a new SMTP Connector which is going to take all of the junk mail. Make sure the “Address Space” properties are set that SMTP is accepting for * (all domains) at a cost of 1.

Restart the SMTP Virtual Server.

All of the mail should now go into this new queue you created. Right click the queue, choose “Delete all messages (No NDR)”

Refresh the queue list a few times to make sure all messages are gone.

Stop the SMTP Virtual Server.

Delete the SMTP Connector you just made.

Restart the SMTP Virtual Server.

Mail should start flowing as usual.