Articles in this section

Certificate mismatch using mail Autodiscovery feature in Plesk

kb: technical Plesk Obsidian for Linux Plesk Obsidian for Windows

Applicable to:

  • Plesk Obsidian for Linux
  • Plesk Obsidian for Windows
  • Plesk for Linux
  • Plesk for Windows

Symptoms

  • Mail client returns the following warning about a certificate mismatch when Autodiscovery is configured:

    mceclip0.png

  • The domain doesn't have any mail certificate in Domains > example.com > Mail Settings > SSL/TLS certificate for mail:

    Mail certificate

  • The Autodiscovery requests are providing the domain name as the mail server hostname:

    • Autodiscovery XML response for Outlook:

      # cat autodiscover.request
      <?xml version="1.0" encoding="utf-8"?>
      <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/requestschema/2006">
      <Request>
      <EMailAddress>info@example.com</EMailAddress>
      <AcceptableResponseSchema>
      http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006
      </AcceptableResponseSchema>
      </Request>
      </Autodiscover>

      # curl -k -d @autodiscover.request -u info@example.com -v https://example.com/autodiscover/autodiscover.xml
      ...
      <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
      <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
      <User>
      <DisplayName>info@example.com</DisplayName>
      </User>
      <Account>
      <AccountType>email</AccountType>
      <Action>settings</Action>
      <Protocol>
      <Type>IMAP</Type>
      <Server>example.com</Server>
      <Port>993</Port>
      <DomainRequired>off</DomainRequired>
      <SPA>off</SPA>
      <SSL>on</SSL>
      <AuthRequired>on</AuthRequired>
      <LoginName>info@example.com</LoginName>
      </Protocol>
      <Protocol>
      <Type>SMTP</Type>
      <Server>example.com</Server>
      <Port>465</Port>
      <DomainRequired>off</DomainRequired>
      <SPA>off</SPA>
      <SSL>on</SSL>
      <AuthRequired>on</AuthRequired>
      <LoginName>info@example.com</LoginName>
      </Protocol>
      <Protocol>
      <Type>POP3</Type>
      <Server>example.com</Server>
      <Port>995</Port>
      <DomainRequired>off</DomainRequired>
      <SPA>off</SPA>
      <SSL>on</SSL>
      <AuthRequired>on</AuthRequired>
      <LoginName>info@example.com</LoginName>
      </Protocol>
      </Account>
      </Response>
      </Autodiscover>

    • Autodiscovery XML response for Thunderbird:

      # curl -k https://example.com/mail/config-v1.1.xml?emailaddress=info@example.com
      ...
      <clientConfig version="1.1">
      <emailProvider id="example.com">
      <domain>example.com</domain>
      <displayName>info@example.com</displayName>
      <displayShortName>info@example.com</displayShortName>
      <incomingServer type="imap">
      <hostname>example.com</hostname>
      <port>993</port>
      <socketType>SSL</socketType>
      <authentication>password-cleartext</authentication>
      <username>info@example.com</username>
      </incomingServer>
      <outgoingServer type="smtp">
      <hostname>example.com</hostname>
      <port>465</port>
      <socketType>SSL</socketType>
      <authentication>password-cleartext</authentication>
      <username>info@example.com</username>
      </outgoingServer>
      <incomingServer type="pop3">
      <hostname>example.com</hostname>
      <port>995</port>
      <socketType>SSL</socketType>
      <authentication>password-cleartext</authentication>
      <username>info@example.com</username>
      </incomingServer>
      </emailProvider>
      </clientConfig>

Cause

This is expected because the Autodiscovery mail feature creates an XML response with the domain name. See Plesk Obsidian Official Documentation for more details.

Resolution

To keep using the domain name in mail client, configure a certificate in the domain:
  1. Log in to Plesk GUI

  2. Install a certificate in the domain including the domain name: How to install an SSL certificate for a domain in Plesk

  3. Go to Domains > example.com > Mail Settings > Set the SSL/TLS certificate for mail option with the certificate created in the previous step

Use the Plesk hostname or another domain name custom domain name for all mail autodiscovery:
  1. Log in to Plesk GUI
  2. Navigate to Tools & Settings > Mail Server Settings > Mail autodiscover
  3. Specify the domain name to be used in the field Specify a custom domain name for mail autodiscover and click OK

Alternative solution to configure customers to use the server hostname as the mail server: customize clientConfig.incomingServer and clientConfig.outgoingServer values in panel.ini file: [mail] clientConfig.incomingServer="hostname" clientConfig.outgoingServer="hostname"

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.