This post will give you some steps and links to additional information on troubleshooting the different errors you may seen when clicking Test Access to test the configuration of the e-mail router.
In order to troubleshoot the E-mail Router you will want to know what E-mail Access Configuration is set of your users. To find out the configuration you can view each user’s record in CRM under Settings-Application-Users. Each user can have a different configuration like the following.
For more information on the configuration options see the Email Router Scenarios Document.
Troubleshooting Incoming E-mail
Make sure the user has logged into the mailbox so the mailbox is activated before clicking “Test Access”. Also verify you can receive E-mails into that mailbox.
Check the properties of E-mail Router Incoming profile
- Verify the correct URL of the Exchange server is entered.
- You should not put anything at the end like “/OWA” or “/Exchange” or even a simple “/”.
2. Check the Access Credentials to see what they are set to(LocalSystem, UserSpecified, OtherSpecified).
Make sure that the user that is set in the Access Credentials has Full rights to access to the mailboxes you are testing access for. To test this, try to logon to the Router machine with the account set in the Incoming profile (Or do a run as in IE), then try to access to the OWA URL of the User you are currently testing (http://exchangeserver/Exchange/crmuser)
You can check these links below to give Mailbox rights to the user that is set in the Access Credentials of the Incoming Profile. For setting permissions on a mailbox in Exchange 2003 http://technet.microsoft.com/en-us/library/aa998707(EXCHG.65).aspx
For setting permissions on a mailbox in Exchange 2007, http://technet.microsoft.com/en-us/library/bb124097(EXCHG.80).aspx
3. If User Specified is used in the access Credentials then make sure the user that you are trying to connect to has set their username and password in Tools-Options as the router will use those credentials to access the users mailbox.
Note: The User Specified option is used in the scenario where the router is monitoring user mailboxes. This would be when the users E-mail configuration is set to E-mail Router for the Incoming Profile.
If you have an error type HTTP 400 (Bad Request), HTTP 404 (Not Found), HTTP 502 Bad Gateway, or The Remote name could not be resolved:
Make sure the Exchange URL you entered in the E-mail Router Incoming profile is correct, the syntax must be:
a. You should not put anything at the end like “/OWA” or “/Exchange” or even a simple “/”.
Check IIS Logs on Exchange Server to see what Virtual Directory it is failing on (ExAdmin or Exchange)
1. IIS 6 - %SystemDrive%\WINDOWS\system32\LogFiles
2. IIS 7 - %SystemDrive%\inetpub\logs\LogFiles
Is SSL required on the Exadmin or Exchange virtual directory?
- If so make sure to include https in the Exchange url when setting up the Incoming Profile.
Check if there is a Valid Certificate.
1. Do not use selfssl generated certificates
2. Try to navigate to the url that is set in incoming profile in IE
b. Are there any Certificate Errors?
Check if Exchange 2007 roles are separated
- If the Exchange Server roles are on separate machines make sure to use the Exchange server that is the mailbox server role when creating the incoming profile.
If you have an error type HTTP 404 (Not Found)
For Exchange 2007
Connect to the Exchange server (Mailbox Server) and in IIS Console Management, verify that the Virtual Directory we are using to connect to the mailboxes are present ( “Exadmin” or “Exchange”).
To do this, expand the default website in INETMGR, and check that EXADMIN folder is there.
If not, this is probably your problem; you will need to re-create it. The following KB Article gives a method to recreate the AD objects / IIS Metabase missing entries.
http://support.microsoft.com/kb/947802 You cannot connect to a clustered Exchange 2007 server through a server that has the Client Access Server (CAS) role installed by using the /exchange virtual directory
The issue could be the CRM User’s E-mail address information. The E-mail Address needs to be verified in CRM (check there is not mistyped address for instance).
For Exchange 2003
We need to make sure that the E-mail Address Login information is the same as the user’s Domain Name login.
Ex: User1 has the following properties set in CRM User Form:
=> This works!
User2 has the following properties:
=> This will fail!
For the moment, we have a workaround for customers experiencing this. Here is how to do it based on the example above.
NOTE: If you are using Exchange 2007 you shouldn’t face this problem.
1. Make sure CRM User’s properties are set to use the E-mail Address they want (CRM.User@domain.com)
2. Configure the E-mail Router using the Configuration Manager, publish the changes.
3. Stop the E-mail Router Service. Open Microsoft.Tools.Crm.EmailAgent.Xml file in an editor like notepad.
4. On top of the file, set ConfigUpdatePeriod = 0
5. Modify each CRM User’s incoming profile like this:
<ProviderConfiguration deploymentId="071e0a6e-649a-44da-a658-79dbffccfbe8"> <ProviderAssembly>Microsoft.Crm.Tools.EmailProviders.dll</ProviderAssembly>
Change ONLY the SUFFIX: CRM.User into User2 like this: <EmailAddress>User2@domain.com<EmailAddress>
6. Save the file and restart the E-mail Router service.
NOTE: No need to perform the TEST ACCESS it will not work! If you want to check if the Router is working, monitor the trace and errors and do real tests. The test access will pick up the information from the CRM Server directly and not from the File, thus the “Fix” will not be used.
If test access does work, but you are receiving 404 errors in the application event log when processing E-Mail messages.
There is a known issue if Exchange 2007 is on Windows 2008 (IIS7). If you check the IIS logs for this 404 Error you will find that the exact status is:
Request Filtering: Denied because URL doubled escaping 404.11
To address this you need to allow double escaping on the Exchange website by running this command:
%windir%\system32\inetsrv\appcmd set config "Default Web Site" -section:system.webServer/security/requestfiltering -allowDoubleEscaping:true
- This usually is due to not using Windows Authentication (only supported authentication method) but Forms Based Authentication. You need to change the authentication mode to Windows Authentication on the Mailbox Server . http://support.microsoft.com/kb/954047 ,
- Make sure to point the Incoming Profile to the Exchange server with the mailbox server is and where the ExAdmin and Exchange virtual directories are.
You can also check this: http://blog.networkfoo.org/?p=195
Troubleshooting Outgoing E-mail
"Outgoing status: Failure - An error occurred while checking the connection to e-mail server EXSERVERNAME. The requested address is not valid in its context"
If the Outgoing Test is failing during Test Access:
- Perform a simple telnet command to verify that connectivity between CRM Router and Exchange is fine.
Ex: TELNET EXSERVERNAME PORT
- Ensure you don’t have any Antivirus services running on the machine preventing calls on port 25.
- See http://support.microsoft.com/kb/915827 for steps on configuring SMTP server to allow relay messages from Microsoft Dynamics CRM.
Troubleshooting Loading Data
When Clicking on Load Data you receive the following error.
The E-mail Router Configuration Manager was unable to retrieve user and queue information from the Microsoft Dynamics CRM server. This may indicate that the Microsoft Dynamics CRM server is busy. Verify that URL 'http://hansoncrm5:5555/MSCRm' is correct. Additionally, this problem can occur if specified access credentials are insufficient. To try again, click Load Data. (The organization name in the URL is case-sensitive. You must type the organization name in the URL exactly as it appears in the Microsoft Dynamics CRM server. To view the organization name as it appears in the Microsoft Dynamics CRM server, start the Web application. The organization name is displayed in the upper-right corner of the application.)
- Make sure the account that is running the Microsoft CRM 4.0 E-mail Router Service is added to the PrivUserGroup Security Group in Active Directory.
- The Account that is specified for the Access Credentials needs to be a CRM Admin User. If the Access Credentials are set to Local System then the computer Account needs to be a member of the PrivUserGroup Security Group in Active Directory.
- Make sure the url is spelled correctly as it is case sensitive for the Organization Name.
- DeploymentProperties table may have incorrect values if you have modified the port or hostheaders on your website. To update the DeploymentProperties table see http://support.microsoft.com/kb/950248
If unable to start the Microsoft CRM Email Router service start here http://support.microsoft.com/kb/954522
Incoming Status: Failure - The E-mail Router service configuration parameter “Emailuser” is missing. This parameter is required. http://support.microsoft.com/kb/947094
Email Router Scenarios Doc http://www.microsoft.com/downloads/info.aspx?na=22&p=1&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d8ea05b4e-825a-4db1-ad59-d894aa5ef33e%26DisplayLang%3den
Blog on how to enable tracing
Blog on E-Mail Connector Tracing tool
Info on virtual directories used for exchange
http://support.microsoft.com/kb/954549 (In Update Rollup 1)
http://support.microsoft.com/kb/952019 (In Update Rollup 1)
http://support.microsoft.com/kb/951849 (In Update Rollup 1)
http://support.microsoft.com/kb/959248 (Coming In Update Rollup 2)
The Microsoft CRM Support Team