What Autodiscover is and what it is used for
Autodiscover is a protocol that allows email clients (such as Thunderbird, Apple Mail, or Microsoft Outlook) to automatically configure the server connection settings for your email address, instead of configuring all parameters manually. This will certainly save you time, especially if you need to configure many accounts.
To use the autodiscover system, you must make sure that your client supports this feature, as not all email clients currently support it fully. You must also update your domain's DNS configuration to add some parameters that will allow you to contact the autodiscover service correctly.
Setting up autodiscover for your domain certainly makes the initial email account setup easier for users and eliminates any errors when entering parameters. It is also a very simple configuration to perform and has no additional cost or performance impact.
SIRSTEVEHQ Mail's Autodiscover implementation provides IMAP and SMTP settings for desktop email clients and Microsoft® Exchange ActiveSync settings for smartphones.
Compatibility
Not all email clients are currently compatible with all protocols. Below is the list of clients for which autodiscover works correctly and the type of protocol used for automatic configuration:
Use `width: 100%` on the table and `max-width: 100%` so it adapts to smaller screens. I’ve also added `overflow-x: auto` to allow horizontal scrolling if the content becomes too wide on mobile.
| Client | Version | Protocol |
|---|---|---|
| Microsoft Outlook | 2013 or later | IMAP and SMTP |
| Microsoft Mail, Contacts, and Calendar app | Windows 10 | Microsoft® Exchange ActiveSync |
| Mozilla Thunderbird | 60 or later | IMAP and SMTP |
| Android | latest | Microsoft® Exchange ActiveSync |
| Apple iOS | 12 or later | Microsoft® Exchange ActiveSync |
Setting up Autodiscover via VirtualHost
To ensure full compatibility with the various email clients, you need to create a VirtualHost on your own server associated with your domain, in the form autodiscover.mycompany.com, with a valid SSL certificate installed. Inside the created VirtualHost, it is sufficient to add a 302 redirect to the SIRSTEVEHQ Mail autodiscover server.
Below is an example virtualhost with redirect rules:
<VirtualHost *:443>
ServerName autodiscover.mycompany.com
ServerAlias autoconfig.mycompany.com
RewriteEngine on
RewriteRule ^.*config-v1\.1\.xml$ https://autodiscover.emailpnl.com/thunderbird.php [NC,R=302,L]
RewriteRule ^.*autodiscover\.xml$ https://autodiscover.emailpnl.com/outlook.php [NC,R=302,L]
RewriteRule ^.*autodiscover\.json$ https://autodiscover.emailpnl.com/outlook.json.php [NC,R=302,L]
SSLEngine on
SSLCertificateFile /path/to/ssl.cert
SSLCertificateKeyFile /path/to/ssl.key
</VirtualHost>
Alternatively, if you cannot modify the virtualhost directly, it is sufficient to create an .htaccess file to place in the document root of your autodiscover.mycompany.com domain:
RewriteEngine On
RewriteRule ^.*config-v1\.1\.xml$ https://autodiscover.emailpnl.com/thunderbird.php [NC,R=302,L]
RewriteRule ^.*autodiscover\.xml$ https://autodiscover.emailpnl.com/outlook.php [NC,R=302,L]
RewriteRule ^.*autodiscover\.json$ https://autodiscover.emailpnl.com/outlook.json.php [NC,R=302,L]
Setting up Autodiscover via DNS records
If you cannot create a VirtualHost in HTTPS, you can configure autodiscover through a configuration on the domain's DNS. However, it is important to remember that this configuration may not be sufficient to make autodiscover compatible with your email client. Access the DNS management panel of the provider where you registered the domain and add the following CNAME records as shown:
| Record | Record Type | Value |
|---|---|---|
| autoconfig.mycompany.com | CNAME | autodiscover.emailpnl.com. |
| autodiscover.mycompany.com | CNAME | autodiscover.emailpnl.com. |
The setting above authorizes your email client to contact SIRSTEVEHQ Mail's autodiscover service to obtain the mail server configuration data for your domain.
After adding the records listed above, it may take up to 24 hours before the DNS change is fully operational.
Verifying the correct setup of records for autodiscover
To verify the correct setup of the records for autodiscover on your domain, you can run the following nslookup commands from the terminal:
nslookup -q=cname autoconfig.mycompany.com
nslookup -q=cname autodiscover.mycompany.com
which should return respectively:
autoconfig.mycompany.com CNAME autodiscover.emailpnl.com
autodiscover.mycompany.com CNAME autodiscover.emailpnl.com