This post is a continuation of the Email Router Demystified - Troubleshooting series. You can find the previous post HERE
To do this, we need to reference the mail flow diagrams shown in the Explanation post previously. We’ll first cover the Outgoing portion of the Email Router.
Troubleshooting Outgoing email issues is the not a difficult part of the Email Router to troubleshoot. The reason is that there are only two different configuration options, SMTP or Exchange Online. Realistically, you troubleshoot these the same way. Obviously we have some restrictions during the troubleshooting steps when working with Exchange Online but these should be pretty obvious. Let’s go ahead and get into troubleshooting at this point.
The first thing to know about troubleshooting the Email Router is to remember the traffic flow. This was shown in the second post of this series but I have included it here as well:
Each step represents a potential break point. The key to troubleshooting is to understand where the error occurs and what the error is telling you. So how can we determine where the issue lies?
The first step to this is to understand, what’s the state of the email within CRM? There are three status the email can be when in CRM.
What’s an easy way of understanding what emails are in which state? The typical recommendation I have made to our customers is to use Advanced Find on the E-mail Messages entity. When building your Advanced Find, you will want to ensure you have, at minimum, the following columns: Subject, From, To, Status Reason, No of Delivery Attempts.
Note: The one thing I want to ensure is pointed out is the last column of No. Of Delivery Attempts. This tells us how many times the Email Router has tried to send the email. Anytime it goes from Pending Send to Sending, it increments this attempt by 1. We delay sending emails that have higher Delivery Attempt counts.
Each of the email statuses signify a different step within the mail flow diagram above. Let’s review each of these now:
We also need to understand the protocols being used for the Outgoing profile. Each scenario dictates different types of tools and troubleshooting:
The main troubleshooting tool we will use for troubleshooting SMTP issues is some sort of network sniffer such as Microsoft Network Monitor (NetMon) or WireShark. Being the company man that I am, let’s take a look at what NetMon will show us.
By adding a Filter of “ProtocolName == “SMTP”, I can easily see all of the SMTP traffic. Now the error the problem email is the following:
Looking through the traffic, I can see that the Exchange server, for “some reason” is throwing Reset packets:
By looking at the NetMon traffic, I knew the issue was coming from the Exchange server and there must be some sort of configuration problem on that particular server. If the issue was intermittent, maybe it was one of the servers in the environment having problems. After doing further troubleshooting, it was found that, the firewall on the Exchange server was blocking the traffic from the CRM server.
Exchange Online is using Exchange Web Services (EWS) to send emails. In this case, we can use Fiddler to see what the response coming back to CRM is.
Additionally, we can use a tool called EWSEditor found on CodePlex. EWSEditor allows us to emulate the same requests as what is being done by the Email Router. In the screenshot above, you can see that CRM is making an EWS call to GetFolder. You’ll notice that the Email Router is going to use the schema version for Exchange 2007 SP1, just a tip when using EWS Editor. We’ll get into the actual usage in a tools post here.
The next part of this post is to cover Troubleshooting Incoming email issues.