tisdag 30 april 2013

Email router configuration

The Microsoft Dynamics CRM 2011 Email router is almost an endless source of joy. One of these is to make it work. I wrote this for my own reference since it might be some time between the occations I have to setup an email router. 

The first thing you do is to launch the Email router configuration manager and what greets you is the profile tab. In this tab you set up incoming and outgoing profiles for your deployment(s). There needs to be at least one incoming and one outgoing profile, but in most occations there will be more of these.

To create a profile click the "new" button on the right. Here you have a couple of choices, the first one being to give your profile a name. In this example it will be "incoming" and the profile will be for incoming mail.

Here I have chosen a POP3 email server which gives us a couple of choices to make. One is Authentication type which can be NTML or clear text, I have chosen the latter here. With clear text it's recommended that you use SSL.

Then you just enter the server address and which credentials you want to use, in the case of POP3 you can choose "other specified" and "user specified". In this screen shot the other specified is marked and as you can see the user name i determined by the email address and that the password window is empty. This means that the user or queue you will associate this profile with will have the email address for user name and a password stored in the Email router. This means also that all users and queues using this profile will have to have the same password, which is NOT recommended and thus you need a profile for each user/queue and you need to update that profile each time the user or queue change the password. That is not good in a couple of ways, one being that you will need the password of the user and that's not best practice in any way.

 If you choose another email server type, for example Exchange 2010, you get another set of options. For Exchange Server 2010 the only way to access the server is using the web services which have a URL. This is entered in the location window and looks something like "http://mail.server.com/EWS/Exchange.asmx". In the screen shot I have just changed from POP3 to Exchange 2010.

For cretentials you have the same choices as in the POP3 case, but you can also chose "Local system account". The "other specified" looks a bit different from the POP3 case too. Here you can enter an admin account which has access to the email boxes that you want to use the router for. The same goes for the Local system account. I haven't used any of these in a live system and have been told, rather harshly, by an exchange expert that you don't want to do that. The third choice is user specified. This means that the user enters credentials into the CRM and those are used to access the email box, seems like the best way to handle this if you're using Exchange.
The result looks something like the image to the left. Another thing to think about if you're using Exchange 2007 is that the Webdav protocol doesn't seem to like some characters. We've had the entire router service shut down when an email entered the inbox with a subject containing a character that the email router did not appreciate.


 Now, the next thing we do have a look at is the Advanced tab.
Here we can change the ports we are using to connect to the server, this is definitely needed when changing the protocol to SSL.











 Now that we've done our incoming rule we need an outgoing rule. Again there are a couple of choices needed, the first being the name, next we choose outgoing for direction and in the second drop down we can choose either exchange online or SMTP. For this example SMTP is our choice.

 Then we have the authentication type. The choices being Windows Authentication, clear text and Anonymous. To be able to use credential type "Local system account" you need to use Windows authentication. Again, if you use clear text be sure to use SSL. After you choose authentication type, you need to enter the url to the SMTP server and finaly choose Access credentials.












In the next screen shot I have made my choices, in this case Clear text which only give me the choice of other specified for credentials. As you can see I've entered a username and a password in the credentials input fields. If I would have chosen anonymous, those fields wouldn't be available.
Again, the Exchange expert I was talking to recommended that you did not use anonymous access to the smtp server. Further she didn't like the idea of one user being able to send emails in the name of everybody in an organization. With this info on hand, the outgoing profile is more or less useless for everyone except queues, and even in that case it's quite a lot of job maintaing the system if you have a lot of queues. One thing I fins a bit curious is that you can't have the user specified credentials for outgoing email, that would have solved some problems at least.

If you need to change some port settings, the advanced tab looks roughly the same as the incoming rule advanced tab.




Now you are done with the profiles and you have a profile tab looking something like this.






















Let's move on to the deployment tab. Here you set up wich CRM deployment you want to use. Again click on the "New" button on the right hand side and you get a new window with settings for the deployment.


Here you can choose to use an on-premise CRM, a partner hosted CRM or an on-line CRM. I chose on-premise (My Company) and entered the url for the crm, complete with port and organization name. Then I entered a user after chosing "Other specified" as credential type, the other choice is Local system account. Make sure to use a user with enough rights in the CRM, otherwise it might work in an unexpected way. The last two dropdowns specify if you want to use any profile as default, I chose not to do this.






After that is done we want to link our users and queues to profiles, that is done on the last tab
Here I have already clicked "Load Data" after chosing my deployment from the dropdown. All email router enabled users and queues from the organization are shown and you simply open them and add an incoming and/or outgoing profile to them. After that is done you press the "Test Access" button to se if there are any obvious errors done.



As you can see all data is entered correctly and the test went ok.












Now, this doesn't mean that it will work, this means there are no errors in the setup. And this ends this quick demo of how you set up a email router for CRM 2011, and CRM 4.0 since they differ very little if they do at all.

Hope this helps!

Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se    

1 kommentar:

  1. I am really inspired with your writing abilities
    as neatly as with the structure to your blog.
    Is this a paid subject matter or did you modify it your self?

    Either way keep up the excellent quality writing, it's rare to see a nice blog like this one nowadays..

    my page; Vpn Router

    SvaraRadera