Mail client auto-configuration

Have you ever worked with Thunderbird as a mail client? When you add a mail account you get a wizard like this:

You click on Continue and Thunderbird tries to find out which parameters are needed to connect to your mail server properly. But usually you just end up with this:

What is necessary to help Thunderbird (and other mail clients like Evolution, Kmail, Kontact or even Outl**k) with that? Unfortunately there is no standard for it yet. Thunderbird has a couple of methods implemented.

For large ISPs they maintain their ISPDB database. But your market share may not be enough to be listed there. The next best option is to provide an XML file in a certain format through your web server. Thunderbird will look for this URL:

https://example.org/.well-known/autoconfig/mail/config-v1.1.xml

The syntax of the XML file is described here and here. A simple configuration file looks like this:

Try to load that URL /.well-known/autoconfig/mail/config-v1.1.xml from your domain in your web browser. At least Firefox and Chrome-based browsers validate the XML content automatically and tell you if you made a syntax mistake. No errors? Very good.

Now next time you set up an account using Thunderbird (or other mail clients that support auto-configuration this way) your users will have a very pleasant quick way to add their email account. Try it out.

Keep in mind that every domain you are hosting requires such an auto-configuration file. I’m confident that you find a way to generate those files automatically. 🙂

Yes Thunderbird said it found configuration for the server.
The email part was filled by me correctly too. It just is not showing at the username part there is only the inbox name, the part left from the @ sign. The @domain.tld part is not showing in the username thingy.

This doesn’t work for me at all, I’ve tried everything!
Placing it under various places both autoconfig.domain.org/mail/config etc or domain.org/.wellknown/autoconfig/mail and just every other variant. When I enter the url I can clearly see the config file, which I’ve tried to change multiple times. Nothing is working.
DNS records, pointing to autoconfig.domain.org
Can’t understand why it is not working.

If any of the content on workaround.org has made your daily life less miserable you are invited to donate via Paypal to email@christoph-haas.de. I also have a wish list of Amazon things for my projects if you would like to surprise me. However please don't feel obliged.