Auto-discovery for Outlook (via IMAP / POP3)

Axigen Auto-discovery

This article was built using Outlook 2016.

Axigen environment:

  • Single server
  • Server level settings
  • Autogenerated SSL certificates for POP3S, IMAPS, SMTPS
  • Signed SSL certificate for HTTPS

In order to configure Auto-discovery for Microsoft Outlook 2016, the following two steps are needed:

1. In axigen.cfg, set to "yes" the flags that enable Auto-discovery for the desired protocol and provide the hostnames and ports corresponding to IMAP(S), POP(S) and SMTP(S) protocols to be advertised by the Auto-discovery.

autodiscoveryParams = {
    enableIMAPAutodiscovery = yes
    enablePOP3Autodiscovery = no
    enableSMTPAutodiscovery = yes
    enableWebDavAutodiscovery = yes
    autodiscoveryDefaultUrls = {
        httpAutodiscoveryUrl = ""
        imapAutodiscoveryUrl = "imaps://example.com:993"
        pop3AutodiscoveryUrl = "pop3s://example.com:995"
        smtpAutodiscoveryUrl = "smtps://example.com:465"
        webDavAutodiscoveryUrl = ""
    }
}

 

2. In your DNS server, configure an entry with the name autodiscover.youremaildomain.tld, such as:

autodiscover          IN      A       193.230.245.23
Screenshots   Insctructions

  1. Open Microsoft Outlook and go to "Add Account"
  2. Provide your Name, email address and password and click "Next"
  3. Click on "Finish" after the Autodiscover process is completed.
  4. In the background, an HTTPS POST request is initiated:
POST /AutoDiscover/AutoDiscover.xml HTTP/1.0

 

Microsoft Outlook 2016 initiates only HTTPS requests for Auto-discovery.

If HTTPS Auto-discovery connection failed (using POST), it will failover on HTTP (using GET) - this will also fail as Axigen does not support this method.

Additional info on Microsoft Outlook (2010) Auto-discovery implementation can be found here: https://technet.microsoft.com/en-us/library/cc511507%28v=office.14%29.aspx

 

The request is traceable in everything.txt (log level set to "Protocol Communication") and should be similar to:

2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << POST /autodiscover/autodiscover.xml HTTP/1.1
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Cache-Control: no-cache
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Connection: Keep-Alive
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Pragma: no-cache
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Content-Type: text/xml
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Cookie: OutlookSession="{B0C6406E-D7E4-423B-AD10-281B81D144B7}"
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << User-Agent: Microsoft Office/16.0 (Windows NT 10.0; Microsoft Outlook 16.0.4266; Pro)
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << X-MS-CookieUri-Requested: t
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << X-FeatureVersion: 1
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Client-Request-Id: {32819878-F70D-4955-B934-825232508484}
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << X-MapiHttpCapability: 1
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Depth: 0
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << X-AnchorMailbox: user@example.com
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << X-User-Identity: user@example.com
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Content-Length: 347
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Host: example.com
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << Authorization: ***
2016-11-24 07:36:29 -0500 08 axigen WEBMAIL:00000118: ASYNC account 'user@example.com' has logged in
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISCOVER REQUEST
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISC <?xml version="1.0" encoding="utf-8" standalone="no" ?>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISC <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006" xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISC 
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISC   <Request>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISC     <EMailAddress>user@example.com</EMailAddress>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISC     <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISC   </Request>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISC 
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: << AUTODISC </Autodiscover>
2016-11-24 07:36:29 -0500 08 axigen WEBMAIL:00000118: AUTODISC Start reading Autodiscover requests for 1 email addresses
2016-11-24 07:36:29 -0500 08 axigen WEBMAIL:00000118: AUTODISC Build response for Autodiscover OUTLOOK Schema
2016-11-24 07:36:29 -0500 08 axigen WEBMAIL:00000118: AUTODISC Using IMAP AUTODISCOVER URL from server configuration: imaps://example.com:993
2016-11-24 07:36:29 -0500 08 axigen WEBMAIL:00000118: AUTODISC POP3 Autodiscovery is disabled
2016-11-24 07:36:29 -0500 08 axigen WEBMAIL:00000118: AUTODISC Using SMTP AUTODISCOVER URL from server configuration: smtps://example.com:465
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> 200 OK
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISCOVER RESPONSE
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC <?xml version="1.0" encoding="utf-8" standalone="no" ?>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC 
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC   <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC     <Culture>en:us</Culture>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC     <User>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC       <DisplayName/>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC       <EMailAddress>user@example.com</EMailAddress>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC     </User>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC     <Account>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC       <AccountType>email</AccountType>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC       <Action>settings</Action>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC       <Protocol>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <Type>IMAP</Type>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <Server>example.com</Server>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <Port>993</Port>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <SSL>on</SSL>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <LoginName>user@example.com</LoginName>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC       </Protocol>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC       <Protocol>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <Type>SMTP</Type>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <Server>example.com</Server>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <Port>465</Port>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <SSL>on</SSL>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC         <LoginName>user@example.com</LoginName>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC       </Protocol>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC     </Account>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC   </Response>
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC 
2016-11-24 07:36:29 -0500 16 axigen WEBMAIL:00000118: >> AUTODISC </Autodiscover>