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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Autodiscover.xml redirects

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

Tags:
  1. Edab

    Edab Registered

    Joined:
    Sep 17, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Sydney
    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:

    Code:
    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):

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

    Place something similar to the below (dont forget to modify the autodiscover.domain.com 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.

    Code:
    RedirectMatch (?i)/Autodiscover/Autodiscover.xml https://autodiscover.domain.com/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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    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.
     
Loading...

Share This Page