Score:0

Autodiscover for Windows 10 Mail not working

in flag

I'm not sure if this question is best suited for here, or StackOverflow. I'm trying to get autodiscover working for Windows 10 mail (just a standard IMAP/SMTP type - not Exchange). According to the documents, I need a /autodiscover/autodiscover.xml file on autodiscover.ultranerds.co.uk. So I have:

https://autodiscover.ultranerds.co.uk/autodiscover/autodiscover.xml

Which is:

<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>IMAP</Type>
<Server>mail.ultranerds.co.uk</Server>
<Port>993</Port>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
</Protocol>
<Protocol>
<Type>POP3</Type>
<Server>mail.ultranerds.co.uk</Server>
<Port>995</Port>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>mail.ultranerds.co.uk</Server>
<Port>465</Port>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
</Protocol>
</Account>
</Response>
</Autodiscover>

I can see the requests coming in on the log file:

52.125.138.6 - - [05/Jan/2023:07:03:16 +0000] "GET /autodiscover/autodiscover.json?Email=test%40ultranerds.co.uk&Protocol=ActiveSync&RedirectCount=1 HTTP/1.1" 404 1434 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.138.6 - - [05/Jan/2023:07:03:16 +0000] "POST /autodiscover/autodiscover.xml HTTP/1.1" 200 305 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.138.6 - - [05/Jan/2023:07:03:16 +0000] "POST /autodiscover/autodiscover.xml HTTP/1.1" 200 305 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.138.6 - - [05/Jan/2023:07:03:16 +0000] "GET /autodiscover/autodiscover.xml HTTP/1.1" 301 162 "-" "-"
52.125.138.6 - - [05/Jan/2023:07:03:16 +0000] "GET /autodiscover/autodiscover.xml HTTP/1.1" 301 162 "-" "-"

When I try and add the account in Windows Mail, I just get:

enter image description here

What am I missing? I've even tried adding DNS SRV records, as apparently that works in some programs? (I wish they all just had a fixed standard they all used!)

UPDATE: After disabling auto-https redirection, I get:

52.125.138.6 - - [05/Jan/2023:07:37:44 +0000] "GET /autodiscover/autodiscover.json?Email=test%40ultranerds.co.uk&Protocol=ActiveSync&RedirectCount=1 HTTP/1.1" 404 1434 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.138.6 - - [05/Jan/2023:07:37:44 +0000] "POST /autodiscover/autodiscover.xml HTTP/1.1" 200 305 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.138.6 - - [05/Jan/2023:07:37:44 +0000] "POST /autodiscover/autodiscover.xml HTTP/1.1" 200 305 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.138.6 - - [05/Jan/2023:07:37:44 +0000] "GET /autodiscover/autodiscover.xml HTTP/1.1" 200 305 "-" "-"
52.125.138.6 - - [05/Jan/2023:07:37:44 +0000] "GET /autodiscover/autodiscover.xml HTTP/1.1" 200 305 "-" "-"

I guess the 2 versions are http:// and https:// calls - but it still doesn't accept the autodiscover params :(

UPDATE 3: Still no joy. I'm even trying it via the DNS SRV records - but it still doesn't seem to take the values:

enter image description here

So infuriating!

jp flag
Is your HTTP & HTTPS logs going into the same log file? The last two lines are redirects, and apparently Windows 10 Mail does not follow them...
Andrew Newby avatar
in flag
@EsaJokinen thanks. Yes, both HTTP and HTTPS go into the same log. I do have a redirect from http:// to https:// - http://autodiscover.ultranerds.co.uk/autodiscover/autodiscover.xml - is it better to disable auto-redirect to https?
Andrew Newby avatar
in flag
@EsaJokinen I have disabled auto-redirect, and they all show as 200 codes now. Without splitting http/https logs into separate files, I'm confident the 2 requests are one or the other. I just don't get why its not accepting the file I'm providing. According to the M$ help pages its the right format
jp flag
I would not recommend plain HTTP, but for debugging purposes you could temporarily try it.
Andrew Newby avatar
in flag
@EsaJokinen nothing seems to work it seems :( Out of desperation I've even tried the SRV records - but even that doesn't work. There doesn't seem to be a way to debug what its getting / why its saying there is an issue. Its a shame there isn't a local log file (on the PC) showing what is being returned, and why its a problem
jp flag
Can you test with a domain that works and see what's different?
Andrew Newby avatar
in flag
@EsaJokinen the problem is I only have domains on my own server, so none of them have it. The stupid thing is that Thunderbird works perfectly with http://autoconfig.ultranerds.co.uk/mail/config-v1.1.xml ... just M$ stuff thats not playing ball
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.