I have a domain (let's call it example.com) that hosts web and email from the server, using cpanel. I've moved the email from that server to Google Apps.
When I create a new account in Thunderbird it uses the server part of the email address to look up the server. One way it could do it is to find the IP of the server hosting the main A record, then do an nslookup to get the server name. However there are two DNS records, autoconfig and autoconfiguration, both of them point to the server's IP. However even after changing those records to point to Google Apps (and waiting more than the DNS TTL) Thunderbird won't point autoconfig at Google apps.
I've found one article here (which refers to here) but it involves getting SSL certificates. If I go the subdomain it describes on one of my websites
http://autodiscover.headphonereviews.org
It directs to
https://cpanelemaildiscovery.cpanel.net/autodiscover/autodiscover.xml
which turns out to be a "not found" error.
However when I go to
http://autoconfig.headphonereviews.org/
I get an XML document which seems to define how to collect email. Progress! However when I created a subdomain autoconfig.example.com it wouldn't resolve (though I only waited a few minutes). I'll wait until tomorrow to see if DNS resolves.
This started out as a question but it turned into research... suggestions are more than welcome!