How does Outlook automatically determine mail server details?

Solution 1:

Is this just a preset list that they have within the software that determines the servers to connect to and the correct settings or is there a DNS-based or similar tool it uses to determine what those server details are?

It is called the Exchange Autodiscover service, and while the details vary slightly from version to version, it's a service that's "configured" on the Exchange server, and meant to work with Outlook clients.

You would not be able to make use of it with other email servers, as you had originally tagged your question, nor does it generally work with non-Microsoft email clients or applications - not because it can't, but because it was designed by Microsoft, for use with their email client (Outlook).

If you read the white paper, you can get details on it, and it's really fairly simple (Outlook sends a query to AD, gets an autodiscover url back, and hits it up to try to pull down the data it auto-populates), so there's probably nothing stopping someone from supporting it with a different email server or client, but there's not a whole lot of motivation to do so either, since it relies on Microsoft AD, is a proprietary standard utilized by Microsoft Exchange and Microsoft Outlook, and offers no compatibility outside of the Microsoft ecosystem.

If it uses something that can be set up on the server side, what needs to be set to assist Outlook (or similar applications) with automatically getting server details for a server?

It is automatically set and configured when you install the Client Access Server Role on an Exchange server, so you don't really need to set anything up, other than the CAS Role on your Exchange server(s). There is a fairly useful article, here, that gets a bit deeper into what all the auto-discover service entails, which can be fairly useful for troubleshooting, or non-standard/non-supported autdiscover setups, but there is really very little that an administrator actually does in configuring autodiscover. It either works, and you're happy, or it doesn't, and you pull out a lot of hair troubleshooting it.