4.2 Discovering Account Settings by Using the Autodiscover Command
The end-user enters his or her email address and domain credentials, for example, email@example.com.
The client uses the domain information in the user's email address, that is, contoso.com, and tries to locate the Autodiscover service by sending an Autodiscover command request to the following predefined URLs:
https://<SMTP-address-domain>/autodiscover/autodiscover.xml (In this example, this URL is: https://contoso.com/autodiscover/autodiscover.xml.)
https://autodiscover.<SMTP-address-domain>/autodiscover/autodiscover.xml (In this example, this URL is: https://autodiscover.contoso.com/autodiscover/autodiscover.xml.)
If the Domain Name System (DNS) contains a host record that maps one of these URLs to a server where the Autodiscover service is hosted, then the Autodiscover service responds with the settings that are required for the device to begin synchronizing. This response includes values for the server type, the URL, and the Name element (section 126.96.36.199.1).
If redirection to another Autodiscover service is required, then the Redirect element (section 188.8.131.52) is present and contains a URL to the Autodiscover server to query for the desired information.
The device then re-creates a partnership with the new server, and send an Autodiscover command request to that server.
If the response included the settings that are required for the device to begin synchronization, then the device applies the settings to initiate synchronization.
If the Autodiscover command request in step 3 fails, then the device performs a DNS SRV lookup for _autodiscover._tcp.<smtp-address-domain>.com, which in this example maps to _autodiscover._tcp.contoso.com. If the DNS lookup is successful, then "mail.<smtp-address-domain>.com" is returned, which maps to "mail.contoso.com". The device then applies the settings to initiate synchronization. For more information about performing the DNS SRV lookup, see [MSFT-DNS-SRV].
The following sections show success and error response messages.
Account autodiscovery uses an email address to look up information that is required to configure software. Given an email name (such as firstname.lastname@example.org), a list of possible Autodiscover servers is generated. The client contacts the name Autodiscover.domainname to provide the information. If that information is not found, the client tries to send the request to the domain name. If the information still is not retrieved, the client can use a manual configuration. For example, the client tries these servers:
The client sends each server an HTTP POST command. The post data is an XML request for a certain type of information. Email account configuration is the first use. The XML contains information that helps execute the request. For mail, the information includes the email address, the protocols that the client software supports, the Web browser that is installed, the type of proxy that is being used, and the types of authentication that can be used.
The post is sent for servername/autodiscover/autodiscover.xml. The server name is defined according to the process described earlier in this topic.