Mail Autodiscovery
AdminBolt configures mail autodiscovery automatically for every domain and subdomain that has email, so mail clients (Microsoft Outlook, Mozilla Thunderbird, Apple Mail, and others) can find the correct server settings on their own. Users only type their email address and password; the client fills in the servers, ports, and security for them.
This is automatic. There is no toggle to enable it and no manual setup: the records and endpoints are published when the domain is created, and kept in sync as things change.
What gets published per domain
When a domain (or subdomain) with mail is created, AdminBolt publishes a set of DNS records. You can see them in the domain's zone (see DNS Templates for the template they come from, and the client Zone Editor for a live zone).
| Record | Name | Points to | Purpose |
|---|---|---|---|
| SRV | _imaps._tcp (port 993) | mail host | IMAP over SSL (RFC 6186) |
| SRV | _pop3s._tcp (port 995) | mail host | POP3 over SSL (RFC 6186) |
| SRV | _submission._tcp (port 587) | mail host | SMTP submission over STARTTLS (RFC 6186) |
| SRV | _submissions._tcp (port 465) | mail host | SMTP over SSL (RFC 6186) |
| SRV | _autodiscover._tcp (port 443) | autodiscover.<domain> | Microsoft Outlook discovery |
| SRV | _autoconfig._tcp (port 443) | autoconfig.<domain> | Mozilla Thunderbird discovery |
| A | mail | server IP | Hostname mail clients connect to |
| A | autoconfig | server IP | Serves the Mozilla autoconfig file |
| A | autodiscover | server IP | Serves the Outlook autodiscover file |
| MX | @ | mail host | Where mail for the domain is delivered |
The mail host is either mail.<domain> or the shared server hostname, depending on whether a per-domain certificate is in place - see Mail host: per-domain or shared below.
How clients discover the settings
On top of the DNS records, AdminBolt serves the per-client autoconfiguration files over HTTPS:
- Microsoft Outlook queries
https://autodiscover.<domain>/autodiscover/autodiscover.xml(with the JSON variants.../autodiscover.json?Protocol=Imapand?Protocol=Smtpfor newer clients). - Mozilla Thunderbird and compatible clients query
https://autoconfig.<domain>/.well-known/autoconfig/mail/config-v1.1.xml. - Clients that follow RFC 6186 read the
_imaps,_pop3s,_submission, and_submissionsSRV records directly.
The mail.<domain>, autoconfig.<domain>, and autodiscover.<domain> names are all served by the same server and are covered by the domain's certificate (see Mail SNI).
Resulting mail-client settings
Whichever path a client uses, it ends up with the same settings:
| Service | Host | Port | Security |
|---|---|---|---|
| IMAP | mail host | 993 | SSL/TLS |
| POP3 | mail host | 995 | SSL/TLS |
| SMTP (submission) | mail host | 587 | STARTTLS |
| SMTP (alternative) | mail host | 465 | SSL/TLS |
The username is the full email address (for example [email protected]), and the password is the mailbox password set in Email Accounts.
Mail host: per-domain or shared
The mail host advertised by autodiscovery follows the domain's certificate state:
- No valid per-domain certificate yet - autodiscovery points clients at the shared server hostname. Mail still works; the connection just uses the server's own hostname.
- A valid certificate covering
mail.<domain>is in place - autodiscovery, the SRV records, and the MX record switch tomail.<domain>, so each domain has its own mail hostname and certificate. This is handled by Mail SNI.
The switch is automatic in both directions: issuing the certificate moves a domain to mail.<domain>, and removing it falls back to the shared hostname.
Automatic maintenance
- Records and autoconfig files are created when the domain is added.
- They are refreshed automatically when the server hostname changes or when a domain gains or loses its per-domain mail certificate.
- Autodiscovery is enabled by default for Domain and Subdomain types (not for parked domains).
Related
- Mail SNI - per-domain mail certificates over SNI
- Email Settings - the mail backend (Dovecot/Postfix) configuration
- DNS Templates - the template the mail records come from