A few days ago i started recieving the security alert when i start outlook 2007 from the internet. The security alert is that it is saying there is a security mismatch between autodiscover.domain.com and the actual ssl cert in IIS (mail.domain.com). I didn't make any modifications on the external DNS but i have done updates on both my client and server so i suspect that there is some new update that has changed this behavior. I will continue to investigate this, but be warned that the following guide might not work for the single ssl cert. If anyone has information that might help i certainly would like to hear, i'm not happy that i need to pay $200/year when $20/year works the same.
(Note1 - This initial configuration i did on the initial release of Exchange 2007 - since then SP1 has been release and made it possible i believe to accomplish a few more things in the Exchange Management Console - if you install exchange 2007 and update it with SP1 there maybe some easier ways to do stuff in the EMC but as yet i have not done this so this guide still reflects the pre-sp1 setup)
This information may change as mistakes or details are dealt with
I pass this information on, that it may be of help to others (including myself in remembering what i did!)
First i want to thank, t0ta11ed, Sembee, and Henrik, and others who have posted information in this forum and all over the internet.
Preamble: This is my setup, so i cannot guarantee that this will work for you, I have for this setup, 1 server running Windows 2003 x64. If you want to install Exchange 2007 you will need it on either Windows 2003 x64 or 2008 x64 bit versions, the 32bit (x86) will not work. I also have one static public (external) IP. Most of the configurations i came across for Exchange will talk about multiple web sites (with different internal IPs) the thing they rarely mention is that you will need multiple external IPs to map to these internal IPs. If you have multiple external IPs then it is probably better that you assign 1 for autodiscover.domain.com so that you have more choices down the road instead of locking it to the same IP as your main CAS IP. If however you are restricted to 1 external IP this may help you.
A little note about SSL certificates, Exchange 2007 is a bit of a nightmare for SSL certificates, by default you have a self-signed certificate made by exchange, which is ok if you have no one accessing any external services like OWA, activesync, RPC over HTTP (OutlookAnywhere). However this scenario is probably unlikely. If you do have these services then you either can install this self-signed certificate on every computer that needs to access these services not to mention telling people to click through the IE7 stupid "There is a problem with this website's security certificate”, needless to say this is really not a viable option for most people. So pretty much the only real option is a commercial SSL certificate. Trying to find the most economical way to do things, i tried StartCom's free (yes really free, not trial) SSL certificate, problem is that it is trusted by almost everyone INCEPT Internet Explorer, needless to say it becomes a pain to teach people the same thing about untrusted certificates. OK – other choices – for Exchange 2007 you are talking about 2 SSL (I'll show you the bypass to get it to 1 later), one for mail.domain.com and another for autodiscover.domain.com, that means if you've done any research on the subject that you need an SSL cert that supports SAN (Subject Alternative Name). At present the cheapest one is $200/year, others are considerably more expensive. Better but even $200/year i find a little steep if all you need is just a CAS certificate (exchange 2003 front-end certs are easily <$100). On top of this you may already have a mail.domain.com cert that would now be useless. I have a mail.domain.com cert from GoDaddy which cost $20/year (or less) and that is the one that i will be using.
To start off I did a clean install of windows 2003 x64, setup DNS, WINS (if necessary), DHCP, IIS in that order, a fairly typical PDC. Then a standard install of Exchange 2007, there a few extra programs and hotfixes to install but the install program is good about telling you what you need. A little note, you can install the Exchange tools on a 32 bit machine to do most of the administration from a client machine. Ok so you have a clean Exchange install, let's configure it.
To allow Exchange to accept connections from other mail server, open Exchange Management Shell (EMS)
Run the following command;
Set-RecieveConnector –Identity "Default <ServerName>” –PermissionGroups "AnonymousUsers”
Replace <ServerName> with your CAS name. Close the EMS
To allow Exchange to send mail to other mail servers, open Exchange Management Console (EMC), open Organization Configuration->Hub Transport, click on 'Send Connectors', Right click (RC) in the 'Send Connectors' box and select 'New Send Connector', choose a name, for example 'All Outgoing Connector', leave the 'Select the intended...' as Custom, for the Address Space click the 'Add' button and enter * in the Add Address Space window marked Domain, to accept SMTP connections from all domains, leave the 'Include all subdomains' unchecked. In Network settings leave all values at their default settings, in 'Source Server' again leave the default values, and finally in 'New Connector' click on 'New' to create the connector.
At this point Exchange should be able to send & receive mail.
At this point if you are going to support Outlook with RPC over HTTP you will need to install that service, go to Control Panel->Add/Remove Programs->Add/Remove Windows Components, Select Networking Services, click on details, click the 'RPC over HTTP Proxy', click 'ok', Click 'next', make sure Windows has access to the install source, after the proxy is installed, click 'Next'.
Now you need to remove the Exchange self-signed cert, Open up IIS manager (Administrative Tools->Internet Information Services (IIS) Manager), Open the Server subfolder, open the 'Web Sites' folder, and open the 'Default Web Site', there will be several virtual directories (VD) below the DWS including owa, and Autodiscover. RC the DWS and select Properties, then click the 'Directory Security' tab, then click 'Server Certificate' and then click 'Next' at the SSL welcome wizard. The next step depends if you already have an SSL certificate for mail.domain.com or not. If you do then click 'Replace the current certificate' and follow the instructions. If you do not have an SSL certificate then select the 'Remove the current certificate'. The latter will only remove the certificate from the DWS, it will stay in the windows certificate store so if you ever need it in the future you can always get it back. After you remove the certificate, re-run the wizard and it should ask you to go through the process of asking for an SSL certificate, follow the wizard which will create an certreq.txt file which you will need to make the application at a Certification Authority (CA) company, such as GoDaddy or others. I will leave this to you to follow since the process varies a bit from CA to CA (ie for GoDaddy you need to install an intermediate certificate, which may not be necessary for more expensive CAs. I am using a turbo ssl cert which is registered for mail.domain.com and costs $20/year.
At this point you should have your mail.domain.com cert on the DWS, and any other intermediate certs installed.
Next lets change owa so you need to just enter your username and not domain\username; In EMC go to Server Configuration->Client Access, RC the owa (DWS) click Properties, click the authentication tab, select the 'use forms-based authentication:' and then select the 'User name only', then click on Browse and choose your logon domain. Click 'Ok' to exit.
To install Outlook Anywhere in EMC go to Server Configuration->Client Access, RC the server and select 'Enable Outlook Anywhere', for the External host name use: mail.domain.com , External authentication methods: choose NTLM authentication, do not select 'Allow secure channel (SSL) offloading', click Finish to exit.
Next we need to change the URLs used autodiscover so that all services point to mail.domain.com.
In EMC go to Server Configuration->Client Access choose the Offline Address Book (OAB) Distribution tab, RC the OAB (DWS) and select properties, Click on the URLs tab and put in: https://mail.domain.com/oab for both both internal and external URLs. Click 'Ok' to accept and exit.
Do the same for owa by going to Server Configuration->Client Access (Outlook Web Access tab) andRC the owa (DWS) and choose properties, on the General tab change the Internal and External URLs to: https://mail.domain.com/owa , click 'Apply', an extra feature you may want to give is access to network shares through owa, this is available on the Documents box in owa, if you do then go to the 'Remote File Servers' tab and click the 'Configure' button on the bottom, enter the domain you are using, ie for mail.domain.com you would put domain.com, click 'add' then click 'ok' to exit. Then click on the 'Allow' button and enter the FQDN of your CAS, ie if the CAS computer name is mx1.domain.com, then enter mx1.domain.com and click 'add' then 'ok'. This will give owa users access to any network shares that exist on mx1. Click 'ok' to save and exit. If you do not want this then disregard that previous procedure and click 'ok' to exit.
Next we'll change the URLs for the Unified Messaging, while this step is probably not necessary for most people, it will look better at the end. However to change the URLs we need to go to the EMS.
Open the EMS and enter the following command;
Set-UMVirtualDirectory "UnifiedMessaging (Default Web Site)” –InternalURL https://mail.domain.com/Unifiedmessaging/Service.asmx -ExternalURL https://mail.domain.com/Unifiedmessaging/Service.asmx
Next we change the URLs of the Availability service which will also be the same for OOF, in EMS enter the following command;
Set-WebServicesVirtualDirectory –Identity "EWS*” –InternalURL https://mail.domain.com/EWS/Exchange.asmx -ExternalURL https://mail.domain.com/EWS/Exchange.asmx
Finally we set the autodiscover URL, now this is a little special since it is not possible to set the external URL of autodiscover. Outlook 2007 is set to look for autodiscover.domain.com or domain.com/autodiscover, and this is in my opinion where all the security alert mess comes from. Anyways in the EMS enter the following command;
Set-ClientAccessServer –Identity "your CAS server name (ie mx1)” –AutoDiscoverServiceInternalUri https://mail.domain.com/autodiscover/autodiscover.xml
Ok all done with EMS, you can close it and go to your DNS management, Administrative tools->DNS. First in the Foward Lookup Zone (FLZ) for domain.com, RC the domain.com and select 'New Host (A)', enter: mail ,for the name and input the Internal IP of your CAS. Next RC the FLZ under your server and select 'New Zone', click 'Next' at the wizard introduction, leave the zone type as Primary and ActiveDirectory integrated, click 'Next', leave the zone replication on the default, which is to all domain dns servers, click 'Next', For the name enter: autodiscover.domain.com , click 'Next', for the dynamic updates change the setting to 'Allow both unsecure and secure dynamic updates, click 'next then click 'Finish'. Now RC the new autodiscover.domain.com and select 'New Alias (CNAME)', leave the name field blank and just click on the Browse button, In the new browse window, double-click (DC) the server name, DC the FLZ folder, DC domain.com and then select the mail entry, click 'ok' to complete. You can now close DNS.
I would recommend restarting the server to insure that the new settings are accepted. One thing you will want to check after the restart is to go to EMC->Server Configuration->Mailbox, RC the mailbox database, select properties, click on the 'Client Settings' tab and verify that you have the 'Default Offline Address Book' listed in the Offline address Book window, if not click on the Browse button and select it. If it was not there then restart the server again after you have selected it.
Ok almost done! You should be able to start up a Outlook 2007 client and when adding an exchange mail account it should use the autodiscover feature to get all the URLs. Hopefully everything should work, if you do get a Security Alert windows then try restarting the client and server, also verify that the SSL cert is accepted on the client. If everything did go well then Outlook can connect and send/receive from exchange. Now you can check that all the URLs are pointing to mail.domain.com, while holding down the left 'Ctrl' button RC the Outlook icon in the system tray, this should give you a menu which has 'Test e-mail Autoconfiguration' in the test window, enter your email (ie firstname.lastname@example.org), unselect the "use guesssmart” and "secure guesssmart authentication” then click 'Test'
If everything goes well then you should have 2 sections after the results come in, one for Exchange RPC and the other Exchange HTTP. The RPC is for LAN connections and HTTP is for HTTP connections. In both sections all the URLs should start https://mail.domain.com
If this is not the case then go back and find the problem.
Another test to do is to verify that your OWA is working internally. If you open Internet Explorer (IE) and enter https://mail.domain.com/owa , don't forget to change domain to whatever your domain is. This should give you the OWA login webpage, if not then go back and find the problem. You should not have any Security Alerts with the OWA.
If this is ok then your 200x Outlook clients should be working ok internally and your 2003 clients should be ok externally. However if you try your Outlook 2007 clients from the internet you will probably find that they give a Security Alert, and that is because they are looking for either an SSL with a name of autodiscover.domain.com or domain.com. Since yours is for mail.domain.com it will give a name mismatch error. To resolve this you must access your external dns entries which are usually handled by your hosting provider. For your external DNS you will have a MX record for where your mail is sent and probably entries for www, ftp, etc. These are the way that computers on the internet find domain.com resources. Usually it takes 4 to 24 hours for adding or changing the external DNS entries to actually start redirecting clients, so don't expect just because you changed the MX record that your email will be redirected right away. The setup is very similar to the DNS entries for the internal network, for the external DNS entries you will have the MX record to point to mail.domain.com (MX cannot point to an IP), you will need a Host record (A) that is for mail.domain.com which points to your external IP and finally an Alias (CNAME) entry for autodiscover.domain.com which will point to mail.domain.com.
This way when Outlook 2007 is on the internet and asks joeblow_nameserver for autodiscover.domain.com it will be sent to your external DNS entries where it will find autodiscover.domain.com which is an alias for mail.domain.com, the exact details of why outlook accepts it i am not sure, but it doesn't give me any complaints. So this way you don't need multiple external IPs (expensive), nor SAN SSL certificates (unnecessary and expensive), nor create multiple internal websites (unnecessary).
I have been using this for a few weeks now and everything appears normal and stable, i have been using Outlook 2007, i have not tested this on Outlook 2003 however i do not think there should be any problems. The OWA and Outlook clients have no problems connecting, the only thing which i find a bit un-normal is that it seems to take about 2 minutes for Outlook to connect and synchronize, with Exchange 2003 and Outlook 2003 it seems to be quite a bit faster, if anyone can comment on this I'd appreciate any insight.
I have tested this also with Windows Mobile 2003SE and the activesync works well, if you have the GoDaddy cert you will need to add the CA cert to the WM2003 trusted root store, then after that it connects fine.
Most of this information is around the internet but I thought this would be useful to write down in one place since i didn't find much information about external DNS settings. I did leave out some extra information about redirecting the OWA URL, which allows users to log into the port 80 http owa url and then get redirected to the 443 https url, however i am not really satisfied with the current method of the redirect html page. If i find something i'll post back. Anyways i hope this give some insight for some and will help with the installation.
< Message edited by TwoJ -- 22.May2008 11:25:23 AM >