Skip to content
  • There are no suggestions because the search field is empty.

How do I setup the Auto-Discover Service and create SRV/CNAME records for the service?

MDaemon includes support for AutoDiscover, which simplifies the configuration of accounts in email clients that support the protocol.  The Auto-Discovery service is enabled by default. 

In most cases, the email address and password are all that's required to configure client and devices with correctly configured AutoDiscover records. 

Notes:

  • The Auto-Discover service requires Webmail to have HTTPS enabled.
  • A valid (non self-signed) SSL certificate is recommended.
  • Certain clients may behave differently when querying Auto-Discover records. 

Add a Service (SRV) record to the public DNS for the service you'd like to configure.

Airsync (used for ActiveSync), AutoDiscover, IMAP, SMTP, CalDAV, CardDAV, and XMPP (used for chat/instant messagner) SRV records are detailed in this article.

Replace 'company.test' with the MDaemon domain.

  • Airsync SRV Record 
    Domain: company.test
    Service: _airsync
    Protocol: _tcp
    Priority: 0
    Weight: 0
    Port Number: 443
    Host/Target: autodiscover.company.test 

ActiveSync requires HTTPS server is listening to port 443 in order to function.

  • AutoDiscover SRV Record
    Domain: company.test
    Service: _autodiscover
    Protocol: _tcp
    Priority: 0
    Weight: 0
    Port Number: 443
    Host/Target: autodiscover.company.test
  • IMAP SRV Record
    Domain: company.test
    Service: _imap
    Protocol: _tcp
    Priority: 0
    Weight: 0
    Port Number: 993
    Host/Target: autodiscover.company.test

An additional IMAPS SRV record can be created to point to port 993 (the default secure IMAP port).

  • SMTP SRV Record
    Domain: company.test
    Service: _smtp
    Protocol: _tcp
    Priority: 0
    Weight: 0
    Port Number: 25 
    Host/Target: autodiscover.company.test

The SMTP port number can be configured to use the SSL port (465) or MSA port (587) for secure connections if desired.

  • POP3 SRV Record
    Domain: company.test
    Service: _pop
    Protocol: _tcp
    Priority: 0
    Weight: 0
    Port Number: 995
    Host/Target: autodiscover.company.test
  • CalDAV SRV Record
    Domain: company.test
    Service: _caldav
    Protocol: _tcp
    Priority: 0
    Weight: 0
    Port Number: 443
    Host/Target: autodiscover.company.test
  • CardDAV SRV Record
    Domain: company.test
    Service: _carddav
    Protocol: _tcp
    Priority: 0
    Weight: 0
    Port Number: 443
    Host/Target: autodiscover.company.test

CalDAV and CardDAV protocols are used to sync calendars and contacts on supported clients.  The CalDAV and CardDAV server is enabled by default and these services must be enabled.

The CalDAV and CardDAV server runs under the same HTTPS port as Webmail's webserver.

Certain clients or devices may query CalDAVS and CardDAVS instead of CalDAV and CardDAV.  Creating additional _caldavs and _carddavs SRV records would be recommended for clients that request them.

  • XMPP SRV Record
    Domain: company.test
    Service: _xmpp-client
    Protocol: _tcp
    Priority: 0
    Weight: 0
    Port Number: 5223
    Host/Target: autodiscover.company.test

MDaemon's XMPP server is enabled by default and must be enabled in order for chat services to function.

 

Add a new A Record or CNAME to the public DNS

  • If using an A record, it is recommended that the record is autodiscover.company.test and it points to public IP address of the server that MDaemon is installed on.
  • If using a CNAME, it is recommended that the record is autodiscover.company.test and it points to the host-name of the MDaemon server.

Once the record has been propagated, verify that you can access the AutoDiscover Service for MDaemon. You can verify this by browsing to the following link in a web browser:

  • https://AutoDiscover.company.test/AutoDiscover/AutoDiscover.xml


The client uses the domain information in the user‘s e-mail address, that is, company.test, and tries to locate the AutoDiscover service by sending an Auto-Discovery command request to the following predefined URLs:

  • https://company.test/autodiscover/autodiscover.xml
  • https://autodiscover.company.test/autodiscover/autodiscover.xml
  • https://autodiscover.company.test/mddp

Example:

Account AutoDiscover uses an e-mail address to look up information that is required to configure software. Given an email user@company.test, a list of possible AutoDiscover servers is generated. The client contacts the name autodiscover.company.test 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:

  • autodiscover.company.test
  • company.test

Each server is sent an HTTP Post command. The post data is an XML request for a certain type of information. E-mail account configuration will be the first use. The XML contains information that helps execute the request. For mail, the information includes the e-mail 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.

Logging Information

MDaemon logs basic AutoDiscover traffic to the AutoDiscover-YYYY-MM-DD.log file, located in the directory path of MDaemon's other log files.

The default Logs directory is <drive-letter>:\MDaemon\Logs.

Debug logging can be enabled by editing the \MDaemon\Data\AutoDiscover.ini file using a text editor. Add LogXML=Yes to the [System] section and save the INI file. It is recommended to set LogXML=No or remove the entry when not reviewing issues.

This log file can be useful for trouble shooting issues and should be submitted if requesting technical support.

IIS Configurations

If running Webmail under Microsoft IIS Web-server, you will need to configure a new URL Rewrite for the MDAutoDiscover.dll and MDDP.dll files:

  1. Open the IIS Manager
    • Click Start
    • Click All Programs
    • Click Administrative Tools
    • Click Internet Information Services (IIS) Manager
  2. On the Connections pane, expand the [Machine_name] node
  3. Expand the Sites node
  4. Click on the WorldClient/Webmail site in the Connections pane
  5. Double click on URL Rewrite
  6. On the Actions pane, click Add Rule(s)...
    • Under Inbound Rules, select Blank Rule and click OK
    • Name the rule: MDAutoDiscover.dll
    • Under Match URL set these settings:
      • Requested URL: 'Matches the Pattern' (the default)
      • Using: 'Regular Expressions' (the default)
      • Pattern: ^AutoDiscover
      • Ignore Case: 'Enabled' (the default)
    • Under Action set these settings:
      • Action type: 'Rewrite' (the default)
      • Rewrite URL: 'MDAutoDiscover.dll'
      • Append query string: 'Enabled' (the default)
    • In the Actions pane, click Apply
    • In the Actions pane, click Back to Rules
  7. Double click on URL Rewrite
  8. On the Actions pane, click Add Rule(s)…
    • Under Inbound Rules, select Blank Rule and click OK
    • Name the rule: MDDP.dll
    • Under Match URL set these settings:
      • Requested URL: 'Matches the Pattern' (the default)
      • Using: 'Regular Expressions' (the default)
      • Pattern: ^MDDP
      • Ignore Case: 'Enabled' (the default)
    • Under Action set these settings:
      • Action type: 'Rewrite' (the default)
      • Rewrite URL: 'MDDP.dll'
      • Append query string: 'Enabled' (the default)
    • In the Actions pane, click Apply
    • In the Actions pane, click Back to Rules
  9. Close Internet Information Services (IIS) Manager

Additional Comments

The setup of Webmail/ActiveSync/AutoDiscover under IIS is NOT supported by MDaemon Technologies support staff and those who choose to run these services under IIS must be aware of all security issues and ramifications of running any applications under IIS. It is recommended that all Patches and updates be installed in IIS before configuring it to serve any MDaemon components.