Auto-discovery for Mozilla Thunderbird (via IMAP / POP3)

Axigen Auto-discovery

This article was built using Mozilla Thunderbird 45.0.

Axigen environment:

  • Single server
  • Server level settings
  • Autogenerated SSL certificates for POP3S, IMAPS, SMTPS
  • Signed SSL certificate for HTTPS

In order to configure Auto-discover for Mozilla Thunderbird (which in this case is called "Autoconfiguration"), the following two steps are needed:

1. In axigen.cfg, set to "yes" the flags that enable Auto-discovery for the desired protocol and provide the hostnames and ports corresponding to the IMAPS / POPS and SMTPS protocols to be advertised by Auto-discovery.

autodiscoveryParams = {
    enableIMAPAutodiscovery = yes
    enablePOP3Autodiscovery = no
    enableSMTPAutodiscovery = yes
    enableWebDavAutodiscovery = yes
    autodiscoveryDefaultUrls = {
        httpAutodiscoveryUrl = ""
        imapAutodiscoveryUrl = "imaps://example.com:993"
        pop3AutodiscoveryUrl = "pop3s://example.com:995"
        smtpAutodiscoveryUrl = "smtps://example.com:465"
        webDavAutodiscoveryUrl = ""
    }
}

 

2. In your DNS server, configure an entry with the name autoconfig.youremaildomain.tld, such as:

autoconfig          IN      A       193.230.245.23
SCREENSHOTS INSTRUCTIONS

In Mozilla Thunderbird, from the File menu select "New" → "Existing Mail Account..."

Enter your name, email address, and password and click on "Continue".

 

The email client will initiate an HTTP requests to check for the "Autoconfiguration".

You will need to enter your email address and password again in this pop-up window and click on "OK".

Mozilla Thunderbird first checks for the autoconfig.<domain> DNS record that should point to the Axigen IP.

The request done by the MozillaThunderbird client is:

 

If the "Autoconfiguration" DNS record is not found, the request done by the Thunderbird Mail client is:

and this would be a valid path only if yourmaildomain.tld is pointing to the Axigen server

You can click on "Done" to finalize the setup.

Using the newly created account in Mozilla Thunderbird, send an external email (and make sure it's received), in order to make sure everything works as expected.

 

Currently, Thunderbird does not initiate HTTPS requests for Auto-discovery.

Additional info on the Thunderbird "Autoconfiguration" implementation can be found on https://wiki.mozilla.org/Thunderbird:Autoconfiguration

 

The request is traceable in everything.txt (log level set to "Protocol Communication" for the WebMail service) with the autoconfig.maildomain.tld DNS record:

2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: << GET /mail/config-v1.1.xml?emailaddress=user%40example.com HTTP/1.1
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: << Host: autoconfig.example.com
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: << User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 Lightning/4.7.4
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: << Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: << Accept-Language: en-US,en;q=0.5
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: << Accept-Encoding: gzip, deflate
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: << Connection: keep-alive
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: << Authorization: ***
2016-11-24 05:39:16 -0500 08 axigen WEBMAIL:00001D9A: ASYNC account 'user@example.com' has logged in
2016-11-24 05:39:16 -0500 16 axigen PROCESSING:50000000: >> Open container '/var/opt/axigen/domains/example.com/objects/00.hsf': success
2016-11-24 05:39:16 -0500 08 axigen WEBMAIL:00001D9A: AUTODISC Using IMAP AUTODISCOVER URL from server configuration: imaps://example.com:993
2016-11-24 05:39:16 -0500 08 axigen WEBMAIL:00001D9A: AUTODISC POP3 Autodiscovery is disabled
2016-11-24 05:39:16 -0500 08 axigen WEBMAIL:00001D9A: AUTODISC Using SMTP AUTODISCOVER URL from server configuration: smtps://example.com:465
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> 200 OK
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG RESPONSE
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG <?xml version="1.0" encoding="utf-8" standalone="no" ?>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG <clientConfig version="1.1" xmlns="">
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG 
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG   <emailProvider id="example.com">
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG     <domain>example.com</domain>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG     <displayName/>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG     <incomingServer type="imap">
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <hostname>example.com</hostname>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <port>993</port>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <socketType>SSL</socketType>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <authentication>password-encrypted</authentication>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <username>user@example.com</username>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG     </incomingServer>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG     <outgoingServer type="smtp">
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <hostname>example.com</hostname>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <port>465</port>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <socketType>SSL</socketType>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <authentication>password-encrypted</authentication>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG       <username>user@example.com</username>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG     </outgoingServer>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG   </emailProvider>
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG 
2016-11-24 05:39:16 -0500 16 axigen WEBMAIL:00001D9A: >> AUTOCONFIG </clientConfig>

 

The request is traceable in everything.txt (log level set to 'Protocol Communication' for the WebMail service) without the autoconfig.maildomain.tld DNS record and works only if YourRootDomain.tld is pointing to the Axigen server:

2016-11-23 11:48:46 -0500 16 axigen WEBMAIL:000015E7: << GET /.well-known/autoconfig/mail/config-v1.1.xml?emailaddress=user%40example.com HTTP/1.1
2016-11-23 11:48:46 -0500 16 axigen WEBMAIL:000015E7: << Host: example.com
2016-11-23 11:48:46 -0500 16 axigen WEBMAIL:000015E7: << User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 Lightning/4.7.4
2016-11-23 11:48:46 -0500 16 axigen WEBMAIL:000015E7: << Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
2016-11-23 11:48:46 -0500 16 axigen WEBMAIL:000015E7: << Accept-Language: en-US,en;q=0.5
2016-11-23 11:48:46 -0500 16 axigen WEBMAIL:000015E7: << Accept-Encoding: gzip, deflate
2016-11-23 11:48:46 -0500 16 axigen WEBMAIL:000015E7: << Connection: keep-alive
2016-11-23 11:48:46 -0500 16 axigen WEBMAIL:000015E7: << Authorization: ***
2016-11-23 11:48:47 -0500 08 axigen WEBMAIL:000015E7: ASYNC account 'user@example.com' has logged in
2016-11-23 11:48:47 -0500 08 axigen WEBMAIL:000015E7: AUTODISC Using IMAP AUTODISCOVER URL from server configuration: imaps://example.com:993
2016-11-23 11:48:47 -0500 08 axigen WEBMAIL:000015E7: AUTODISC POP3 Autodiscovery is disabled
2016-11-23 11:48:47 -0500 08 axigen WEBMAIL:000015E7: AUTODISC Using SMTP AUTODISCOVER URL from server configuration: smtps://example.com:465
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> 200 OK
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG RESPONSE
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG <?xml version="1.0" encoding="utf-8" standalone="no" ?>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG <clientConfig version="1.1" xmlns="">
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG 
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG   <emailProvider id="example.com">
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG     <domain>example.com</domain>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG     <displayName/>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG     <incomingServer type="imap">
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG       <hostname>example.com</hostname>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG       <port>993</port>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG       <socketType>SSL</socketType>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG       <authentication>password-encrypted</authentication>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG       <username>user@example.com</username>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG     </incomingServer>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG     <outgoingServer type="smtp">
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG       <hostname>example.com</hostname>
2016-11-23 11:48:47 -0500 16 axigen WEBMAIL:000015E7: >> AUTOCONFIG       <port>465</port>