1. Knowledge Base
  2. MDaemon® Email Server

How to create and publish an Autoconfiguration file for easy Thunderbird client configurations

Thunderbird email clients can utilize a configuration file to apply specific settings to the client during the account creation. This article details how to create the configuration file and publish it on the MDaemon server.

Webmail must be enabled and accessible in order for these steps to work.

The goal of this article is to create and publish an autoconfigure file that Thunderbird will utilize when setting up new accounts.  Within the autoconfiguration file, administrators can specify specific details to apply to the account during the account setup.  The hostname, protocol, ports, authentication method, and more can all be customized for an easy client experience.  

For detailed information on the autoconfiguration file and format, please see the Mozilla Wiki entries below.

https://wiki.mozilla.org/Thunderbird:Autoconfiguration

https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat

 

Entering the email address and password when setting up a new mail account in the Thunderbird client, it will search for a config-v1.1.xml file published on the server.  It is in this file where administrators can enter information for the client to apply. 

Thunderbird will first search for the XML in the following URL.

https://company.test/mail/config-v1.1.xml

If the XML file cannot be found in the above location, it will try the following.

https://autoconfig.company.test/.well-known/autoconfig/config-v1.1.xml

For further clarification, if the XML file cannot be found in either of the above.  Thunderbird will check its ISPDB for domain entries.  If the ISPDB does not return any results, Thunderbird will resort to "guessing" the applicable hostnames, security, and/or ports to use.  

 

MDaemon administrators can place the config-v1.1.xml file in either of the locations on the server below based on which URL that can access the XML file. Folders that do not exist will need to be created.

https://company.test/mail/config-v1.1.xml
[Drive_Letter]:\MDaemon\WorldClient\HTML\mail\config-v1.1.xml

https://autoconfig.company.test/.well-known/autoconfig/config-v1.1.xml
[Drive_Letter]:\MDaemon\WorldClient\HTML\.well-known\autoconfig\config-v1.1.xml

If the config-v1.1.xml file is being stored in the [Drive_Letter]:\MDaemon\WorldClient\HTML\.well-known\autoconfig\ directory, an A record for autoconfig.company.test will need to be created and published in DNS to point to MDaemon's IP address used for Webmail.  This may be necessary for domains that cannot or do not have an A record for company.test that points to the MDaemon Webmail IP address.  

company.test is the example domain used in this article.  Be sure to change company.test to the MDaemon domain name.

HTTPS is not required to utilize the autoconfiguation file.  However the use of HTTPS is strongly recommended from a security standpoint. 

Deploying a valid certificate is free and easy using MDaemon's Let's Encrypt automated process.

How do I get a free, 90 day SSL certificate from Let's Encrypt?

 

When Thunderbird successfully finds the config-v1.1.xml file, the client will display Configuration found at email provider during the client setup.

autoconfig_success

 

The contents of the config-v1.1.xml file can be modified in a variety of ways.  In this article, we'll detail the XML file to include instructions for an IMAP/SMTP configuration, specifying the hostname for the domain, using SSL on port 993 for IMAP, SSL on port 465 for SMTP, and sending the password in cleartext.

Do not choose "password-cleartext" as an authentication method if not using HTTPS.


Open the config-v1.1.xml file in a text editor and paste in the following template.  Make any edits as necessary.  The <domain> and <hostname> fields will need to be changed to reflect MDaemon's domain and the hostname used for clients to connect to MDaemon.

<clientConfig version="1.1">

<emailProvider id="company.test">

<domain>company.test</domain>

<incomingServer type="imap">

<hostname>mail.company.test</hostname>
<port>993</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>

</incomingServer>

<outgoingServer type="smtp">

<hostname>mail.company.test</hostname>
<port>465</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>

</outgoingServer>

</emailProvider>

</clientConfig>

If MDaemon is home to a number of domains, this XML file can be expanded for use with multiple domains by entering additional domains.

<domain>company1.test</domain>

<domain>company2.test</domain>

<domain>company3.test</domain>