exchange.sembee.info
from Sembee Ltd.
UK MS Exchange Consultants
Exchange 2007 - Single Name SSL Certificate

Exchange 2007 relies heavily on web services, and to secure those services, uses SSL certificates. By default, when you install Exchange 2007 it generates an SSL certificate for you. However that certificate will generate prompts outside of the network, when used with OWA etc.
Therefore to ensure that you do not get any certificate prompts, you need to change the SSL certificate for a commercial trusted SSL certificate. 

Ideally, you should be deploying a SAN (Subject Alterative Name) or UC (Unified Communications) certificate. These will contain the additional names that you need to use with Exchange 2007, including the server's real internal name, the name for OWA and autodiscover.example.com. The process to deploy the preferred certificate type is here.

However for various reasons, including the cost or investment in an existing SSL certificate, you may not wish to purchase an additional certificate.
Therefore using a single name certificate is an attractive option, particularly when you can get a new certificate from sources such as GoDaddy (https://CertificatesForExchange.com) for US$30/year.
However until a change introduced by Microsoft with Outlook 2007 SP1, using a single name certificate involved multiple certificates and multiple sites. With the introduction of Windows 2008, and Microsoft stating that Outlook Anywhere outside of the Default Web Site is not a supported configuration, this method became redundant.

However configuring Exchange to use a single name certificate can be complicated, and this guide will show you what you need to do.

Unified Messaging

If you are using Unified Messaging then you cannot use this process for the UM role. UM requires that the server's real name is located in the SAN certificate. With a single name certificate you will find that you are unable to enable the certificate for the UM role. Therefore you will have to change the certificate to a UC/SAN type certificate with the required names in it.

Requirements

Initial Configuration - for Internal Operation

The first thing to do is get it working internally. There are a number of reasons for this, the main one being that the entire environment is under your control and can be checked thoroughly as you go along. These settings also apply if you are going to use Exchange 2007 exclusively internally, so no Outlook Anywhere or ActiveSync use.

  1. Setup Split DNS
    You need to setup a split DNS system so that your external name on the certificate resolves internally to the internal IP address of the Exchange server.
    For example, if your certificate was issued to mail.example.net and your Exchange server was on 192.168.11.2 then you would need to ensure that mail.example.net resolves internally to 192.168.11.2. To ensure that DNS works correctly for the zone, you may have to put in additional entries - for example "www" to allow www.example.net to resolve. Refer to our split DNS instructions here: Split DNS.
     
  2. Autodiscover DNS settings.
    You need to make some additional settings in the internal DNS zone.
    1. Remove any existing entries for autodiscover from the DNS zone.
    2. Second, in the DNS zone, right click on the Zone and choose "Other New Records". Choose "Service Location (SRV)" 
      Fig 1: Select Resource Record Type
      Fig 1: Select Resource Record Type

       

    3. Remove the field that comes up by default (_finger) and replace with _autodiscover. For the protocol choose _tcp (which should be the default). Leave priority and weight as the default (0) and set the port as 443.
      Finally set the host as mail.example.net

      Fig 2: New Resource Record
      Fig 2: New Resource Record

      Do not think that you can use another port. As with Outlook Anywhere, it is hard coded to use port 443. Using another port does not enhance your network security, as you do not get security by obscurity.

  3. Certificate Settings in Exchange 2007.
    You need to ensure that your external certificate is imported in to Exchange correctly, so that it is used for all services.
    This section will impact on the users and could also impact on email delivery, therefore it should be done out of hours.

    If you haven't already, get your certificate from your preferred supplier and import it in to IIS. Ensure that it works using OWA without any prompts for certificate errors.
     
    1. In Exchange Management Shell, type get-exchangecertificate. You will then see a list of certificates that are installed on the server.
    2. Then type "Enable-exchangecertificate -thumbprint xxxxxx -services SMTP,IIS,POP,IMAP" - copying the thumbprint from the first command.
      To copy the thumb print, right click in the PowerShell window and choose Mark. Then select the thumbprint and press enter. This copies it to the clipboard. Type the command. When you get to the part where you need to paste the thumbprint, in the top left corner, choose Edit, Paste.


       
    3. Run IISRESET for the new certificate to take effect. 
       
  4. URL Adjustment
    After setting the certificate in Exchange, you need to adjust the URLs to match. These are in a number of places.
     
    • Client Receive Connector
      Adjust the CLIENT Receive Connector in Server configuration, Hub Transport. Change the FQDN to match your external certificate. To use the example above - mail.example.net . DO NOT Change the Default Receive Connector.

      Fig 3: Select Resource Record Type
      Fig 3: Client Receive Connector Properties
    • Client Access URLs

      Next thing to change is the client access URLs. These are what autodiscover gives to the clients, and also what is sent to the client web browser when access is made through the wrong server.

      On servers where you have a single server holding all of the roles, set both the internal and external name to the external SSL certificate name - so replace host.domain.local with mail.example.net. Do take care to leave the rest of the URL as shown.

      Fig 4: Properties of the OWA Virtual Directory
      Fig 4: Properties of the OWA Virtual Directory
      Fig 5: Properties of the Microsoft Server ActiveSync Virtual Directory
      Fig 5: Properties of the Microsoft Server ActiveSync Virtual Directory
      Fig 6: Properties of the OAB Virtual Directory
      Fig 6: Properties of the OAB Virtual Directory


      If you look at POP3 and IMAP in the Client Access area, you should find that the certificate has already been set to your external certificate name - courtesy of the settings above that you changed in PowerGui.

      Fig 7: IMAP 4 Properties (Identical to POP3 Properties)
      Fig 7: IMAP 4 Properties (Identical to POP3 Properties)

       
    • Autodiscover URL
      If you are using a single server, then the following commands can be used:



      However if you are using multiple servers, then you need to set the commands as follows:
      Replace "CAS-Server" with the real name of the server that holds the CAS role.


       
    • Web Services URL
      As with Autodiscover, if you are using a single server then the following commands can be used:



      However if you are using multiple servers, then you need to set the commands as follows:
      Replace "CAS-Server" with the real name of the server that holds the CAS role.


       
    • Outlook Anywhere URL.
      Right click on the Client Access Server and choose Properties. Click on the tab Outlook Anywhere and adjust the URL to match the external name on the SSL certificate.
       
  5. Cycle the Exchange Services
    After making the changes, cycle the Exchange services to ensure that the changes are live.

Script for the Above

Using the power of PowerShell, the above changes can be easily scripted.
Copy the text below in to a new notepad document and modify the two lines at the top - remember to leave the " in place. Then it as a file name ending in ps1 - for example URLs.ps1 on the Exchange server itself.
Then use PowerShell to run it. The best way is to CD to the directory and then use tab - and PowerShell will recognise the script.

Testing

To test the configuration, use Outlook 2007 on a workstation.
Start Outlook 2007 and wait for it to connect.

Then hold down CTRL and right click on the Outlook icon in the system tray next to your clock. Choose "Test Email AutoConfiguration…" Then select the option to test the configuration.
Should you have everything configured correctly, then all of the URLs should appear as your external certificate name and you do not get any certificate prompts.

MSSTD URL

If the URL for Outlook Anywhere under MSSTD is not correct, then you may have to set that manually.
To do that, use the following command in EMS:

External Configuration

For this method to work externally, you need to make the following changes


References

Elsewhere on this site

Split DNS: http://exchange.sembee.info/network/split-dns.asp
Multiple Name SSL Certificates: http://exchange.sembee.info/2007/install/multiplenamessl.asp

Author's Blog

Unified Messaging Requires the Server Name in the SSL Certificate: http://blog.sembee.co.uk/post/Unified-Messaging-Requires-the-Server-Name-in-the-SSL-Certificate.aspx 

Third Party Sites

Certificate Supplier: https://CertificatesForExchange.com

Microsoft Knowledgebase

Warning message when you start Outlook 2007 and then connect to a mailbox that is hosted on an Exchange 2007-based server: "The name of the security certificate is invalid or does not match the name of the site"
http://support.microsoft.com/kb/940726

A new feature is available that enables Outlook 2007 to use DNS Service Location (SRV) records to locate the Exchange Autodiscover service
http://support.microsoft.com/kb/940881

Requires Outlook 2007 SP1 or higher or this roll up: http://support.microsoft.com/kb/939184  (June 27th 2007)


Exchange 2007 Home Page - Site Home Page
Last Page Update: 27/06/2011



More Content from Sembee Ltd.
 
Resources on exchange.sembee.info Other Sites Sembee Ltd.
Microsoft Exchange 2003 Command Prompt Getting Started Guide Microsoft Exchange Consultancy
Microsoft Exchange 2007 Login Scripts Director's Blog
Microsoft Exchange 2010 MS Exchange Resources  
Microsoft Outlook Knowledge Base search  
Exchange Networking Tasks Recovery of MS Office content from Temp Files  
Amazon Store Troubleshoot the Automatic Updates Client  
  UK ISP Status Pages  
© Sembee Ltd. 1998 - 2011.
Reproduction of any content on this web site is prohibited without express written consent. Use of this web site is subject to our terms and conditions. All trademarks and registered trademarks are property of their respective owners. This site is not endorsed or recommended by any company or organisation mentioned within and is to provide guidance only and as such we cannot be held responsible for any consequences of following the advice given.

Sembee Ltd. is registered in England and Wales at 33 Scrivens Mead, Thatcham, Berkshire, RG19 4FQ.
Registered company number: 4704428. VAT Number GB 904 5603 43.

girl