Autoconfig and Autodiscover are lifesavers when it comes to email client software configuration.
Up to date email clients like Thunderbird and Microsoft Outlook will query a server to find out what the actual email settings are.
No more “which port”, and “what security” because, in theory, the email client will discover this itself. What bliss.
That’s why on up to date Virtualmin servers you will find these two additional DNS records on every domain:
autoconfig
autodiscover
On Virtualmin, enable it per domain like so:
Once this is in place, you’ll end up with these website redirects:
/mail/config-v1.1.xml
redirect to `/cgi-bin/autoconfig.cgi`
/.well-known/autoconfig/mail/config-v1.1.xml
redirect to `/cgi-bin/autoconfig.cgi`
Now destination email clients can query for the required parameters:
http://batman.vander.host/cgi-bin/[email protected]
In the example below, you can see the standard suggested ports of 993 SSL for IMAPS and 587 STARTTLS for SMTPS
FAQ
Do Apple email clients support autoconfig?
No. And that’s a reason why email provider help desks are working overtime to help Apple users. Go figure.
From the WHM documentation:
Apple® mail clients do not support AutoConfig or AutoDiscover for IMAP servers. To use AutoConfig and AutoDiscover with Apple products, your server must run Exchange rather than IMAP.
Reference
- https://docs.cpanel.net/knowledge-base/email/autoconfig-and-autodiscover
- https://forum.virtualmin.com/t/bulk-insert-autoconfig-and-autodiscover-dns-records/109985
- https://www.virtualmin.com/documentation/developer/cli/modify_dns
- https://www.virtualmin.com/node/18919
- https://www.virtualmin.com/node/45833
- https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration
- https://kb.vander.host/knowledgebase/control-panels/how-can-i-redirect-apache-virtualmin-website-to-port-443/
virtualmin modify-mail --domain yourdomain.com --autoconfig
To enable it for all domains, do this:
a.b.c.d must be the IP address of the server.
If you’re worried about creating duplicate records, you can do this beforehand:
Obviously repeat for autoconfig.
If you’re IPv6 then do this: