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 redirects

Discussion in 'E-mail Discussion' started by Edab, Sep 17, 2017.

  1. Edab

    Edab Registered

    Sep 17, 2017
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    @cPanelMichael this may be a bug?

    I could be wrong by the below, however;

    It would be a requirement to be able to redirect the Autodiscover.xml elsewhere. The problem is that the built in configuration hierarchy will not allow you to specify a redirect because up the configuration chain in httpd.conf (as has already been pointed out) already contains:

    grep ScriptAliasMatch /etc/apache2/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
    In addition to that, there appears to be no avenue to specify to autodiscover.cgi what to redirect to for each host or even on a global level, even if Remote Mail Exchange is configured for any particular vhost? This causes the CGI script to display a result and thereby also overrides any lower tier redirection - not sure if there's a way to override in htaccess for example?

    If redirect is not available it may, in turn, cause all sorts of problems for IT when it is required that Autodiscover.xml be redirected elsewhere (not worth debating the possibilities, in short there may be no solid way to configure a redirect for Autodiscover.xml).

    A possible (though limited) work around for the current version is to place the following, this is piece-mill and hard to maintain (for others to verify):

    Home » Service Configuration » Apache Configuration » Include Editor » Pre VirtualHost Include

    Place something similar to the below (dont forget to modify the bit):

    CAUTION: THIS IS A GLOBAL CHANGE FOR ENTIRE SERVER IN THIS EXAMPLE, BE CAREFUL. This will change all autodiscover redirects for all configurations to ONE - although it can be further customised.

    RedirectMatch (?i)/Autodiscover/Autodiscover.xml
    SIDE NOTE: existing ScriptAliasMatch does not cover case-insensitive URL's either.

    Again this isn't really a solution, however the problem may be far reaching, indicating that this is a bug - again I could be wrong, however this may already have been pointed out elsewhere I do not know, however I've searched as much as I can and I keep being returned to this thread.
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

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

    Could you provide more information about the specific scenario you are attempting to solve through the use of a custom autodiscover redirect destination?

    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