Set up Autodiscover for SmarterMail

This article applies to recent versions of SmarterMail. View articles for SmarterMail 15.x and earlier.
Autodiscover is a service that allows email clients to automatically determine a user’s mail server address and port from that user’s email address and password alone. This greatly simplifies a user’s setup process when attempting to connect SmarterMail to a desktop client, like Outlook and Windows Mail, as well as mobile clients on their iPhone, iPad, Android, Windows Phone and other mobile devices.
 
Autodiscover is supported by POP, IMAP, SMTP In, Exchange Web Services (EWS) and Exchange ActiveSync (EAS). However, not all email clients handle Autodiscover in the same way. For example, when connecting SmarterMail to mobile devices (iOS, Android, Windows, etc.), only Exchange ActiveSync connections will use Autodiscover. Outlook 2007 and above will return only IMAP connections. The Windows 8 email client will return Exchange ActiveSync, and while Thunderbird does not support Autodiscover at all, it will make the best effort to connect to any mail server. Because each client handles Autodiscover differently, it’s important to review the support documentation of your users’ preferred email client(s) to learn the connection type that’s best suited.
 
NOTE: Utilizing Autodiscover with Exchange Web Services or Exchange ActiveSync requires encryption over SSL or TLS. Therefore, port 443 MUST be available and not blocked by a firewall. For instructions on this configuration, please see Configure SSL/TLS to Secure SmarterMail.
 
To configure Autodiscover for a SmarterMail domain, the following must be done by a SmarterMail Administrator:
 
  • Configure the domain’s Autodiscover settings within SmarterMail
  • Create an A Record for the domain in your DNS configuration
  • Create an SRV Record for the domain in your DNS configuration
  • Create an IIS binding for Autodiscover on the SmarterMail server
 

Configure the Domain’s Autodiscover Settings within SmarterMail

Follow these steps to adjust the protocols enabled for Autodiscover and the ports on which they listen:
 
  1. Log into SmarterMail as a System Administrator. 
  2. Click on the Manage icon. In the Domains section, click on a domain to open its configuration settings. 
  3. On the Options card, ensure the correct Hostname is entered. The hostname is the URL that will be returned when users attempt to connect to their email client. The most common hostname for a mail URL is “mail.yourdomain.com”. 
  4. On the Autodiscover card, adjust the configuration options as needed. Here, you can enable or disable specific protocols from returning Autodiscover results. When a protocol is enabled for Autodiscover, clicking on that protocol’s settings cog will open a window where the encryption type and port can be adjusted. (EAS and EWS require encryption over SSL/TLS and this configuration cannot be modified.) NOTE: If a user has POP disabled for their account, their POP Autodiscover request will not be fulfilled, even if POP is enabled for Autodiscover. This applies to all protocols in their account's Service Access settings.
Modifying the Default XML Response (optional)
NOTE: The Override Desktop XML and Override Mobile XML options should NOT be modified without advanced knowledge of the XML responses used with Autodiscover. Adjusting the custom XML incorrectly can result in invalid responses returned meaning users will be unable to connect to their email client(s).
 
Administrators with advanced Autodiscover knowledge can override the default XML response that is sent from the domain when Autodiscover is requested. There are two types of Autodiscover responses that can be modified: Mobile XML and Desktop XML. The mobile XML response is strictly used with Exchange ActiveSync. The desktop XML response is used with everything else, including IMAP, POP, SMTP In and Exchange Web Services.
 
Follow these steps to override the desktop or mobile XML response sent by SmarterMail:
 
  1. Enable Override Desktop XML or Override Mobile XML
  2. Click on the textbox that appears for Custom Desktop XML or Custom Mobile XML.
  3. In the textbox window that appears, clicking on Generate will show the XML response that SmarterMail would normally send on an Autodiscover request. You can generate this response to make adjustments as needed, or simply enter the XML response you would like to use. 
  4. NOTE: If you turn on an override but never save any custom XML, SmarterMail will use the default protocol settings. However, if the override is turned on, ANY text you save to the Custom XML area will be used for the Autodiscover response. If you save custom text, then later remove that text and save a blank entry, Autodiscover will send a blank response. Therefore, it is imperative that you only enable the override and enter custom Autodiscover XML if you are absolutely sure what you're using is correct.
Other items to note:
 
  • You can adjust the XML reply as needed. However, don’t remove or modify the variables, such as %EmailAddress%, %Base64EmailAddress%, or %DisplayName%, since these are used to identify the user making the Autodiscover request.
  • Any changes made to the XML response should be within the RFC guidelines, though this is not validated by SmarterMail.
 

Create an A Record for the Domain in your DNS configuration

For Autodiscover to work, each domain needs an A Record for "autodiscover.yourdomain.com" that points to the IP address of your mail server. For example, for SmarterTools, we set up an A Record for "autodiscover.smartertools.com" that points to the IP address of our mail server (mail.smartertools.com). In our DNS, the line in our zone file for this A Record looks like this:
autodiscover IN A 69.71.61.105
There are many ways to manage DNS for a domain, as well as many DNS services that can be used, so providing step-by-step instructions on this configuration is difficult. However, adding a record should be fairly straightforward. If you have questions, contact your IT professional, hosting provider or DNS provider for assistance.
 

Create an SRV Record for the Domain in your DNS configuration

Next, you'll want to create an SRV record for your domain. This SRV Record will return the available domain and service (SMTP, POP or IMAP) to the email client requesting Autodiscovery. Technically, setting up an SRV Record is an optional step; however, it is highly recommended as a backup to ensure Autodiscover works properly.
 
The SRV Record that is created should be in the following format and return the root URL of your email server:
_autodiscover._tcp.(your domain)
There are many ways to manage DNS for a domain, as well as many DNS services that can be used, so providing step-by-step instructions on this configuration is difficult. Please check with your IT professional, hosting provider or DNS provider for instructions on configuring an SRV Record for your environment. The following example details the SRV configuration for SmarterTools:
 
Domain: smartertools.com
Service: _Autodiscover
Protocol: _tcp
Priority: 0
Weight: 0
Port: 443
 
Verify the SRV via NSLookup (optional)
Follow these settings to verify that you have set up the SRV Record correctly:
 
  1. On a Windows machine, open the Command Prompt and do the following:
  2. Type NSLOOKUP and press ENTER.
  3. Type set type=srv and press ENTER.
  4. Type _autodiscover._tcp.yourdomain.com, where "yourdomain.com" is the name of your domain, and press ENTER.
In return, you should get something similar to what's shown below, with the IP addresses and server URLs matching what you have set up for your mail server. If your results differ or no results are returned, please review your DNS configuration. It's possible the issue is caused due to DNS caching or replication.
Server: UnKnown
    Address: 127.0.0.1

    Non-authoritative answer:
    _autodiscover._tcp.your-domain.com SRV service location:
    priority = 0
    weight = 0
    port = 443
    svr hostname = mail.your-domain.com

    mail.your-domain.com internet address = 127.0.0.2
 

Create an IIS binding (Host Header) for Autodiscover on the SmarterMail Server

In IIS, a host header for Autodiscover should be added to your SmarterMail website that points your Autodiscover A Record to your SmarterMail installation. For example, for SmarterTools, we have an IIS binding that binds port 80 and 443 to "autodiscover.smartertools.com." This is added in addition to the IIS binding for "mail.smartertools.com", which is the URL used for setting up email clients and accessing the web interface.
 
If your SmarterMail installation is on a * binding and listens for any host header, you'll just need to add the necessary DNS records. However, if host headers are used for each domain, a host header must be added for each domain for both Autodiscover as well as webmail.
 
To learn how to configure a host header in IIS, please review Microsoft’s documentation or our KB article, Set up Hosted Headers.
 
After this step, users can sync their SmarterMail account to an email client that supports Autodiscover using only their email address and password. SmarterMail will take care of the rest!
 
 
Learn more about SmarterMail's enterprise email features and benefits.

Feedback

Add Feedback
Creating an A Record cause Outlook to prompt SSL certificate not trusted. Unless you have a wildcard or SAN SSL certificate. If you are using cheap single domain name SSL certificate, just create the DNS SRV record.
BIS Techies (Rebecca and Family) (April 8, 2014 at 7:15 PM)
How to add these to cPanel Advanced DNS running its own autodiscover. We are running on a Sub-domain.
Chinmay Khandekar (December 16, 2014 at 6:28 PM)
Hi Chinmay, That is actually something you'll need to contact cPanel about.
Andrea Rogers (December 17, 2014 at 8:47 AM)
I have set it up like this, so customers kan connect to the smartermail server using the ssl cert of the mailserver.

Non-authoritative answer:
_autodiscover._tcp.client-domain.com SRV service location:
priority = 0
weight = 0
port = 443
svr hostname = mail.hosting-isp-domain.com

mail.hosting-isp-domain.com internet address = <public IP nr>

Richard Frank (April 6, 2016 at 3:43 AM)
SNI must be enabled when adding the new binding in order to select a different SSL certificate for the autodiscover.domain.ext. Otherwise, it will use the same SSL certificate as your webmail, which will throw up warnings when trying to autodiscover.
Stephen Roesch (November 2, 2016 at 7:06 AM)
So, if you need to add autodiscover.x.x for port 80 and 443 on the existing SmarterMail server's IIS, it throws up the "Binding already being used by a product other than IIS”. I added a second IP to the site and bound autodiscover to those, but it still won't resolve for clients. ?
Andrew Lupton (January 9, 2017 at 1:05 PM)
Hi Andrew! Thank you for reaching out. I would encourage you to review this issue with our Support Department through the use of an Email or Phone Ticket. Please keep in mind that if the issue is determined to be caused by a bug in the software, your ticket / ticket costs would be refunded.
Andrea Rogers (January 18, 2017 at 4:12 PM)
This and other documentations don't explain much about to use one or more IP addresses for one smarter mail instance. Can you (SmarterTools Support Team) please add a help Topic and explain the difference between one or multiple IP addresses and how to enable SSL/TSL support using Multi Domain certificate or single domain certificate. I guess most People get confused about what is possible with each different use case. Regards Roger Ineichen
Roger Ineichen (August 26, 2017 at 5:34 PM)
Hi Roger. Sorry about the long delay in a reply. Our article for configuring SmarterMail with SSL/TLS was modified in March to include details about utilizing a Unified Communications Certificate (UCC) for securing multiple domains.

Configure SSL/TLS to Secure SmarterMail: https://portal.smartertools.com/kb/a2671/configure-ssl-tls-to-secure-smartermail.aspx

Our blog post, Securing SmarterMail With Let's Encrypt, may help as well:
https://www.smartertools.com/blog/2017/08/14-secure-smartermail-with-lets-encrypt

Andrea Rogers (July 30 at 2:36 PM)
The documentation for setting up ActiveSync is extremely poor, especially since ActiveSync is a paid add-on, the resources are not good enough! I am stuck and have tried almost everything to get this working. Try to follow this article exactly and see if it ends up working, some parts are not explained...
Adam (July 27 at 8:14 PM)
Hi Quillo Hosting. I've reached out via email to gather some more information about the trouble you're having.
Andrea Rogers (July 30 at 2:33 PM)

Add Feedback