Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Autodiscover.xml redirect behavior

Discussion in 'E-mail Discussion' started by 4u123, Jun 5, 2018.

  1. 4u123

    4u123 Well-Known Member

    Jan 2, 2006
    Likes Received:
    Trophy Points:
    Moved from: Autodiscover.xml redirects

    I think I can answer that, since I'm having the same problem...

    There is an issue that has been discussed on these forums in some detail - but still seems to be an unresolved problem in many cases. Here is the scenario...

    1. Client has website hosted on cpanel server
    2. Client is using external DNS
    3. Client is using some form of crappy Microsoft Email service- e.g or exchange or whatever and has the MX records set up on their external DNS

    In the above scenario, the Email clients run into a problem with autodiscover, because the crappy Microsoft servers try to find an autodiscover.xml file via HTTP at the users website, which is hosted on the cpanel server. This redirects to the cgi script on the server which causes the autodiscovery process to fail.

    The documented solution is to set the mail routing for the domain in cpanel to "remote" - but this doesn't work.

    The second thing to attempt, is to use a vhost override by adding in a config file for the domain at /etc/apache2/conf.d/userdata/std(or ssl)/2_4/user/domain/

    ...containing a redirect like redirect permanent Autodiscover/Autodiscover.xml http://autodiscover.domain (as long as that has been set up correctly in the external DNS

    However, this doesn't work either. It still seems to redirect to the cgi script.

    I've gone around in circles looking at the wealth of posts on this subject on these forums and elsewhere and I've still not found an adequate solution to this problem.

    In my opinion, it is just not a good idea to make an http request to a website, in order to determine the mail configuration for a domain. It should all be done vis DNS records. Microsoft clearly have made a mistake with this - but cpanel have still not really got on top of the issue and so far there is no solution that works, certainly none that I've found.
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello @4u123,

    I just tried reproducing this behavior on cPanel & WHM version 70.0.48, but it looks to correctly return a 400 error when Remote Mail Exchanger is selected under Email Routing for the domain name:

    curl -k -D /dev/stdout --data-binary '<EMailAddress>test1@domain.tld</EMailAddress>' -l http://domain.tld/autodiscover/autodiscover.xml
    HTTP/1.1 400 Bad Request
    Date: Tue, 05 Jun 2018 16:59:07 GMT
    Server: Apache
    Upgrade: h2,h2c
    Connection: Upgrade, close
    Content-Length: 76
    Content-Type: text/plain; charset="UTF-8"
    domain.tld is a remote domain and cannot be configured with autodiscovery.
    If I understand correctly, are you stating that Outlook doesn't properly recognize the "400" error code? Or, that the server is not issuing the 400 error code at all when Remote Mail Exchanger is selected under Email Routing for the domain name?

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice