Autodiscover setting breaking outlook autodisover for domains setup to remote exchange server

slim

Well-Known Member
May 27, 2004
55
1
158
Australia
cPanel Access Level
Root Administrator
I have the Autodiscover for thunderbird setting enabled on my cPanel servers, and it seems to be playing havoc for domains that use remote exchange servers.

I have a domain on my cpanel server with the correct autodiscover record however when setting up the email account in outlook, it keeps looking at the cpanel server, rather than the exchange server.

If I disable the Autodiscover for thunderbird setting this problem goes away and autodiscover works by looking up the autodiscover.mydomain.com cname record and correctly connecting to the exchang eserver.

I'm not sure when all this stopped working, but now none of my clients with exchange can setup outlook.

I'm using the latest cPanel WHM 11.48.1 (build 2) with all the autodisover settings on default in WHM.

Help! This isnt restricted to one server either - I can replicate on multiple cpanel servers.

If I disable the autodisover for thunderbird setting, outlook will setup an account correctly!
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello :)

Internal case number 169545 is open to ensure Autodiscovery returns error code 400 for remote domains. There's no exact time frame available for it's release, but you can monitor our change log for this case number at:

cPanel - Change Log

Thank you.
 

joako

Well-Known Member
Aug 7, 2003
112
2
168
cPanel Access Level
DataCenter Provider
I have addressed this through your "bug reporting" system but obviously that was ignored. How can we make sure that autodiscover for these such domains actually redirects to the correct autodiscover server? It's a step that the client doesn't get the wrong settings, but it would be ideal if they could actually get the correct settings.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
I have addressed this through your "bug reporting" system but obviously that was ignored. How can we make sure that autodiscover for these such domains actually redirects to the correct autodiscover server? It's a step that the client doesn't get the wrong settings, but it would be ideal if they could actually get the correct settings.
Could you elaborate on the bug report you submitted? For instance, what ticket number were you assigned?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
6724739, 6402677, 6279771,6255793, 6255787, 6111585, and 6107821.
I'm unable to find an active case that's not yet implemented. Could you elaborate on the specific issue that still persists at this time, the version of cPanel you are using, and let us know of any case numbers that were referenced to you?

Thank you.
 

joako

Well-Known Member
Aug 7, 2003
112
2
168
cPanel Access Level
DataCenter Provider
Still looking for a solution for this. Basically when the website is hosted with cPanel/WHM Autodiscover on iPhone, Microsoft Outlook, etc doesn't work. The email client gets the wrong settings and the user has to manually configure everything.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Still looking for a solution for this. Basically when the website is hosted with cPanel/WHM Autodiscover on iPhone, Microsoft Outlook, etc doesn't work. The email client gets the wrong settings and the user has to manually configure everything.
Hello,

Could you let us know the records that are automatically imported into those email clients, and the entries you are using to manually correct the issue?

Thank you.
 

sneader

Well-Known Member
Aug 21, 2003
1,195
64
178
La Crosse, WI
cPanel Access Level
Root Administrator
Internal case number 169545 is open to ensure Autodiscovery returns error code 400 for remote domains.
I have a customer that uses Outlook 365, but they host their website with us. They are complaining of theI have confirmed that under MX Entry, they are set to "Remote".

Let's say their domain is example.com. When I browse to http://example.com/autodiscover/autodiscover.xml, it does not return a 400 error, but rather returns a standard 200 response, and shows in the browser "Autodiscover and Autoconfig support is disabled."

Can you tell me what I need to do, to fix this?

Thanks!

- Scott
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
Let's say their domain is example.com. When I browse to http://example.com/autodiscover/autodiscover.xml, it does not return a 400 error, but rather returns a standard 200 response, and shows in the browser "Autodiscover and Autoconfig support is disabled."

- Scott
Do you have "Thunderbird and Outlook autodiscover and autoconfig support (enables proxy subdomain and SRV record creation)" turned on or off in Tweak Settings?
 

sneader

Well-Known Member
Aug 21, 2003
1,195
64
178
La Crosse, WI
cPanel Access Level
Root Administrator
Hi Nick! I have it enabled.

I'm guessing the next answer is... turn it off... so then the question is... is this really a server-wide setting... if one customer is caused grief by this setting, then the other hundreds can't use the feature anymore?

- Scott
 

Recifier

Member
Jan 28, 2015
24
2
53
cPanel Access Level
Root Administrator
I've had to turn off autodiscover in cpanel as well to appease the MS exchange gods.

This sort of explains the problem I had:
https://support.microsoft.com/en-au...ol-outlook-autodiscover-by-using-group-policy

Outlook tries https://domain.com/autodiscover/autodiscover.xml before it tries https://autodiscover.domain.com/autodiscover/autodiscover.xml. Back then, I didn't have an SSL cert for domain.com installed, so for me that meant that outlook would get an ssl error from cpanel via domain.com and then would never try autodiscover.domain.com, which was correctly pointed to the secured autodiscover.xml on the exchange server.

I haven't tried it since then to see how it behaves with an ssl cert installed for domain.com, but I'd assume that if it gets a 200 from cpanel, outlook's autoconfig will still fail. Autodiscover is a nice feature, but only when it works for everyone, so I leave it off.
 

sneader

Well-Known Member
Aug 21, 2003
1,195
64
178
La Crosse, WI
cPanel Access Level
Root Administrator
Back then, I didn't have an SSL cert for domain.com installed
Ah-ha! That is the missing piece to this puzzle... why this is suddenly a problem. I am using AutoSSL with the Let's Encrypt plugin... so.. yes... now almost everyone has working https URLs now. Thank you, rectifier, for solving this mystery.

I am still hoping to get some type of positive response from Nick on this... that there is a way to disable it for just this one customer that is complaining vs disabling autodiscover for everyone else on the server. I wonder if I can do something in .htaccess for that URL? Or since it's a script alias, it never makes it to the customer's account?

- Scott
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Let's say their domain is example.com. When I browse to http://example.com/autodiscover/autodiscover.xml, it does not return a 400 error, but rather returns a standard 200 response, and shows in the browser "Autodiscover and Autoconfig support is disabled."
Hello @sneader,

I've attempted to reproduce this behavior when "Thunderbird and Outlook autodiscover and autoconfig support (enables proxy subdomain and SRV record creation)" is enabled in "WHM >> Tweak Settings" and the email routing for the tested domain name is configured as "Remote Mail Exchanger".

Here are the results when testing with HTTP:

Code:
# curl -k -D /dev/stdout --data-binary '<EMailAddress>[email protected]</EMailAddress>' -l http://cpexample1.tld/autodiscover/autodiscover.xml
HTTP/1.1 400 Bad Request
Date: Thu, 09 Feb 2017 13:43:09 GMT
Server: Apache
Content-Length: 78
Connection: close
Content-Type: text/plain; charset="UTF-8"

cpexample1.tld is a remote domain and cannot be configured with autodiscovery.
Using HTTPS:

Code:
# curl -k -D /dev/stdout --data-binary '<EMailAddress>[email protected]</EMailAddress>' -l https://cpexample1.tld/autodiscover/autodiscover.xml
HTTP/1.1 400 Bad Request
Date: Thu, 09 Feb 2017 13:41:43 GMT
Server: Apache
Content-Length: 78
Connection: close
Content-Type: text/plain; charset="UTF-8"

cpexample1.tld is a remote domain and cannot be configured with autodiscovery.
Could you verify if you are receiving different results with the same commands, and if so, let us know the version of cPanel installed on the system?

Thank you.
 

sneader

Well-Known Member
Aug 21, 2003
1,195
64
178
La Crosse, WI
cPanel Access Level
Root Administrator
Hi Michael. I do not get the same results (but somewhat similar to yours):

Code:
HTTP/1.1 400 Bad request
Date: Thu, 09 Feb 2017 13:57:19 GMT
Server: Apache
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain; charset="UTF-8"

Autodiscover and Autoconfig support is disabled.
I get the same thing above whether I use http or https.

- Scott
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello Scott,

Please run the following commands on this system and let us know what the output is:

Code:
cat /usr/local/cpanel/version
grep autodiscover /var/cpanel/cpanel.config
grep $domain /etc/remotedomains
Replace $domain with the domain name you are testing with, and ensure to not post the real domain name in the output.

Thanks!
 

sneader

Well-Known Member
Aug 21, 2003
1,195
64
178
La Crosse, WI
cPanel Access Level
Root Administrator
Code:
# cat /usr/local/cpanel/version
11.60.0.36
# grep autodiscover /var/cpanel/cpanel.config
autodiscover_host=cpanelemaildiscovery.cpanel.net
autodiscover_mail_service=pop3
autodiscover_proxy_subdomains=1
# grep redacted.com /etc/remotedomains
redacted.com
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello Scott,

Could you also confirm the AutoDiscover ScriptAliasMatch entries exist in /etc/apache2/conf/httpd.conf on this system? EX:

Code:
grep ScriptAliasMatch /etc/apache2/conf/httpd.conf | grep -i auto
If so, could you open a support ticket so we can take a closer look at this system and to investigate why it's behaving differently than expected?

Thank you.
 

sneader

Well-Known Member
Aug 21, 2003
1,195
64
178
La Crosse, WI
cPanel Access Level
Root Administrator
Here is the output of that grep (different httpd.conf location):

Code:
# grep ScriptAliasMatch /usr/local/apache/conf/httpd.conf | grep -i auto
ScriptAliasMatch ^/Autodiscover/Autodiscover.xml /usr/local/cpanel/cgi-sys/autodiscover.cgi
ScriptAliasMatch ^/autodiscover/autodiscover.xml /usr/local/cpanel/cgi-sys/autodiscover.cgi
Will open ticket but is it possible that our outputs are just different because you are using EA4 and I'm on EA3, or anything like that? Do you think my output is causing the problem, where if I had your output, it would be OK? My research seems to indicate that if Outlook 2016 gets any response (even the 400 / bad request / disabled) then it still breaks. The more I read up on this, the more I'm convinced this is a Microsoft issue. :-(

- Scott
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello,

It's possible the issue with Outlook will continue, but you should not be receiving the "Autodiscover and Autoconfig support is disabled" message based on the information you have provided. Feel free to open a support ticket and we can take a closer look at that.

Thank you.