When settings up a new mobile device to sync with an exchange server, it seems to prompt for an e-mail address and password and tries to detect the server settings on its own. Is there a protocol that it uses to do this... and if so where can I find more information about this?
This only works with Exchange 2007 and its called the Autodiscover Service. Basically you need to create an SRV DNS record for your email domain name, that points back to your external facing Exchange server, which will have the autodiscover.xml file configured.
You will also need an SSL certificate on your server from an authority that is trusted by your mobile device, e.g. Verisign. You could use a self issued certificate but you would then have to install it on the mobile device before running the setup wizard, which kind of defeats the purpose.
The SRV record should look something like this:
Then Outlook 2007 SP1+ and Windows Mobile 6.1 can autoconfigure with just an email address and password.