Skip to main content

Autodiscover with cpanelemaildiscovery.cpanel.net?

Comments

10 comments

  • cPanelLauren
    Hello, While this defaults to the cpanelemaildiscovery.cpanel.net our documentation does indicate that you can create your own autodiscover hosts: [QUOTE] Host to publish in the SRV records for Outlook autodiscover support. Microsoft" Outlook""s Autodiscover service searches DNS for an SRV record for an email inbox"s domain that points to a particular server for Autodiscover. By default, this server is cpanelemaildiscovery.cpanel.net. This setting allows system administrators to perform the following actions:
    • Choose the host that the system publishes to the SRV records.
    • Change the default host if they have an SSL-enabled host with an SSL certificate that a Certificate Authority signs.
    • Use their own server for Outlook" Autodiscover. Enter that server"s Fully Qualified Domain Name (FQDN) in the available text box.
    • When you enable the Host to publish in the SRV records for Outlook autodiscover support feature, the system queries the server that you specify for the Autodiscover settings. You must have a custom XML file for this feature to function properly.
    This setting defaults to cpanelemaildiscovery.cpanel.net. Notes:
    Microsoft also provides their own if you're using their services. There are also a few other threads that discuss AutoDiscovery/AutoConfig which might be helpful as well: Thank you,
    0
  • DWardCA
    While this defaults to the cpanelemaildiscovery.cpanel.net our documentation does indicate that you can create your own autodiscover hosts:

    Thank you for your response. Yes, I read up on that. I am also aware that there are PHP scripts out there that offer autodiscover / autoconfig services ( e.g. github.com/Thorarin/MailClientAutoConfig ) However, I was specifically interested in the default cpanelemaildiscovery.cpanel.net service. How the default autodiscover could provide the email configuration for cPanel hosts. Since writing my original post, I learned that in Outlook you can Control + Right-Click the system tray icon and run a "Test Email AutoConfiguration" tool. I did this .. and I think I figured out why I wasn't able to see the autodiscover.xml file myself... It reports: AutoDiscover internet timeout against URL
    0
  • cPanelLauren
    Hello, When querying cpanelemaildiscovery.cpanel.net with your email client you should be able to obtain basic configuration instructions such as: $ curl -d 'test@cpanel.net' https://cpanelemaildiscovery.cpanel.net/autodiscover/autodiscover.xml cpanel test test@cpanel.net MobileSync https://exchange.cpanel.net/Microsoft-Server-ActiveSync https://exchange.cpanel.net/Microsoft-Server-ActiveSync email settings IMAP mail.cpanel.net 993 off off on on test@cpanel.net SMTP mail.cpanel.net 465 off off on on test@cpanel.net
    This appears to be experiencing intermittent issues though as I found while testing. I've opened an internal case to have this addressed. I'll update here when I have more information
    0
  • DWardCA
    Thank You for your help on this cPanelLauren ..
    {simplified quote} IMAP mail.cpanel.net 993 test@cpanel.net

    Even though it is down for me at the moment, you may still be able to answer my question. See how it returns the server "mail.cpanel.net" in your example? How does the cpanelemaildiscovery.cpanel.net autodiscover service know what the mail server should be? ... or does it basically just add the mail host name to the domain provided by the email? So if I did: $ curl -d 'bob@lol.foobar.com' https://cpanelemaildiscovery.cpanel.net/autodiscover/autodiscover.xml
    ... would it return: IMAP mail.lol.foobar.com 993 bob@lol.foobar.com
    ???? PS - thanks for that curl command. Was looking for a good way to test it.
    This appears to be experiencing intermittent issues though as I found while testing. I've opened an internal case to have this addressed. I'll update here when I have more information

    I am relieved it is not just me. Thank you for looking into it ... When I'm lucky I get a "503 Service Unavailable" response. Most times it just gives me a "Connection timed out" -Daniel
    0
  • cPanelLauren
    See how it returns the server "mail.cpanel.net" in your example? How does the cpanelemaildiscovery.cpanel.net autodiscover service know what the mail server should be?

    So what this does is send a GET request to the domain in the email address which *should* return your server's specific autoconfig details: $ curl -d 'lauren@mydomain.tech' https://cpanelemaildiscovery.cpanel.net/autodiscover/autodiscover.xml lauren@mydomain.tech lauren@mydomain.tech email settings IMAP mail.mydomain.tech 993 off off on on lauren@mydomain.tech SMTP mail.mydomain.tech 465 off off on on lauren@mydomain.tech
    When it fails to resolve your domain or get the expected response (i.e. it gets a 301) it will return data specific to the local setup so cpanel.net related information for a test account.
    I am relieved it is not just me. Thank you for looking into it ... When I'm lucky I get a "503 Service Unavailable" response. Most times it just gives me a "Connection timed out"

    I have an internal systems ticket open for this and it is getting attention, I'm sorry for the inconvenience and nope, not just you, thank you for bringing to our attention!! Thank you,
    0
  • DWardCA
    So what this does is send a GET request to the domain in the email address which *should* return your server's specific autoconfig details

    Thanks Lauren .. this is the part I am most interested in .. You say it "should" return the server's specific autoconfig details ... how do I see if that is working on my cPanel server?
    • What page does that GET request ... request?
    • Is it contacting the default host on the domain or is it using a specific hostname such as autodiscover.mydomain.com
    • Is this part of cPanel itself or does each user need to have the support for it? I don't see anything in the apache includes ...
    Thanks Daniel
    0
  • cPanelLauren
    Here's what the request looks like when ran this earlier for an email address on my personal domain: # grep -r autodiscover /etc/apache2/domlogs/ |grep "17/Apr/2018" /etc/apache2/domlogs/proxy-subdomains-vhost.localhost:127.0.0.1 - - [17/Apr/2018:09:16:17 -0400] "GET /cgi-sys/autodiscover.cgi?email=lauren%40mydomain.tech HTTP/1.1" 200 1196 "-" "autodisc/2.000 (cPanel autodiscover/autoconfig server)" /etc/apache2/domlogs/proxy-subdomains-vhost.localhost:208.74.120.173 - - [17/Apr/2018:09:16:17 -0400] "GET /cgi-sys/autodiscover.cgi?email=lauren%40mydomain.tech HTTP/1.1" 200 1196 "-" "autodisc/2.000 (cPanel autodiscover/autoconfig server)" /etc/apache2/domlogs/proxy-subdomains-vhost.localhost:127.0.0.1 - - [17/Apr/2018:13:47:31 -0400] "GET /cgi-sys/autodiscover.cgi?email=lauren%40mydomain HTTP/1.1" 200 1196 "-" "autodisc/2.000 (cPanel autodiscover/autoconfig server)" /etc/apache2/domlogs/proxy-subdomains-vhost.localhost:208.74.120.173 - - [17/Apr/2018:13:47:31 -0400] "GET /cgi-sys/autodiscover.cgi?email=lauren%40mydomain.tech HTTP/1.1" 200 1196 "-" "autodisc/2.000 (cPanel autodiscover/autoconfig server)"
    So the issue with the autoconfig through cpanelemaildiscovery.cpanel.net is happening on our side not yours and while the issue is ongoing I wouldn't suggest testing using it but you can if you like using the same command I used. To set up Autoconfig/Autodiscovery on your own server our documentation here goes over the steps: AutoConfig and Autodiscover - cPanel Knowledge Base - cPanel Documentation
    0
  • DWardCA
    Here's what the request looks like when ran this earlier for an email address on my personal domain

    Thanks Lauren - again - great information. I'm not seeing ANY autodiscover.cgi references in any of our account logs. When I curl or wget against /cgi-sys/autodiscover.cgi it reports Autodiscover and Autoconfig support is disabled. I am guessing that I need to enable proxy subdomains for this to be enabled. Before I enable proxy subdomains I need to do a bit more reserach and ensure it will apply to only new users and won't cause unintended interference with existing configurations (e.g. existing autodiscover configurations in DNS-only clients configured for Office 365) As a side note, I see many autodiscover SRV records in our DNS pointing to cpanelemaildiscovery.cpanel.net - so I am guessing that the configuration option was not persisted during our last hosting provider change migration. Again, thanks for all your help.
    0
  • DWardCA
    I enabled Proxy subdomains, disabled Proxy subdomain creation, and enabled Thunderbird and Outlook autodiscover and autoconfig support (enables proxy subdomain and SRV record creation) It completely rewrote all of the zone files ... so apparently the "enables proxy subdomain and SRV record creation" notice does not *JUST* apply to those subdomains and SRV records that relate to Thunderbird and Outlook autodiscover - it applies to ALL proxy subdomains ... cpcontacts, webmail, webdisk, cpanel, cpcalendars, autoconfig ... plus it added in the caldav and carddav SRV and TXT entries ... It also did this for EVERY subdomain too .. so that was a LOT of records .. I ended up restoring the /var/named files from a backup and restarting the DNS service. After all that ... it looks like the /cgi-sys/autodiscover.cgi is just substituting the domain name of the email that it was passed. I'm not certain if its actually accessing the cPanel configuration at all. Not sure if there is a way to control what information is passes back to cpanelemaildiscovery.cpanel.net .. its an ELF binary .. not a script ..
    0

Please sign in to leave a comment.