Applicable to:
- Plesk Obsidian for Linux
Question
How to manage mail autodiscover in Plesk?
Answer
Autodiscover is enabled by default on all new Plesk Obsidian installations for all domains.
-
Go to Tools & Settings > Mail Server Settings > Settings tab > General options > Enable the Enable mail autodiscover option.
-
Next, enable it for the particular domain:
-
- Enable it under Domains > example.com > Mail Settings. Activate option Enable mail autodiscover
- If you need to enable autodiscover for all domains follow the article #360012848199
-
-
A valid SSL certificate is required. Make sure you have one assigned under Mail Settings tab or issue it using "SSL It" including option "Assign the certificate to mail domain".
-
This step is required only if you create DNS records directly under registrar and not in Plesk. Create SRV records manually under DNS registrar:
https://support.plesk.com/hc/en-us/articles/4985149221650Record type Domain name Service Protocol Priority Weight Port Target SRV example.com _smtps tcp 0 0 465 example.com SRV example.com _imaps tcp 0 0 993 example.com SRV example.com _pop3s tcp 0 0 995 example.com
-
Currently, autodiscover is not compatible with the latest Outlook version 2019 and O365. These mail clients use Microsoft proxy servers for autodiscover requests, and this configuration is not is supported in Plesk.
-
When a custom mail server is configured in Tools & Settings > Mail Server Settings, settings may not be obtained by some applications on Android devices. It depends on the method used by an application to fetch mail settings using autodiscover.
The corresponding request https://jira.plesk.ru/browse/PPPM-13140 was created to address this.
-
Not available for domains without hosting
-
Domain should be secured with valid SSL/TLS certificate.
-
Plesk does not use "mail.example.com" or "imap.example.com". It uses domain name itself like "example.com" as SMTP/IMAP hostname for automatic configuration.
-
Plesk Premium Email has its own features for automatic configuration, it disables autodiscover by Plesk if installed.
Troubleshooting
-
Open tool to run curl commands online
-
Insert the below string, replace "example.com" with your domain name and "admin@example.com" with mailbox name which exists, then click "Run".
# curl https://example.com/mail/config-v1.1.xml?emailaddress=admin@example.com
-
If content section is not empty and contains hostnames, ports means that server generates configuration correctly.
-
Open online SSL Checker tool.
-
Test SMTPs specifying your website name and smtps port:
CONFIG_TEXT: example.com:465
-
Next test IMAPs using website name and imaps port:
CONFIG_TEXT: example.com:993
-
If there is an error about invalid certificate is shown double check domain mail settings using article #115001446174
Comments
68 comments
Apple Mail autodiscover not working.
What can i do?
Since Plesk seems to configure the root domain as default for autodiscover we have to change it (for now) in the Panel.ini.
Even though "mail.<domain>" is included in DNS Plesk does not include this subdomain in the certificate that is then beeing used for the mailserver. (Posted in the forum about this: https://talk.plesk.com/threads/lets-encrypt-and-assign-the-certificate-to-mail-domain-problems-and-autodiscovery-issues-caused-by-this.360307/)
But "webmail.<domain>" is included in the certificate if enabled and therefore can be used as server address. This is anyways easier for most customers to remember. They can just use the same server name for webmail and mail clients. But again this doesn't seem reliable.
The "fun" fact here is that Plesk doesn't seem to provide the customers certificate when the customer enters webmail.<domain> as mailserver address. So where is the problem here? The certificate was selected to be used for the mailserver but doesn't work on some servers. (Weird)
So what to do?
Add the following lines to the Panel.ini file.
[mail]
clientConfig.incomingServer="webmail.<domain>"
clientConfig.outgoingServer="webmail.<domain>"
clientConfig.incomingProtocols="IMAP over SSL/TLS, POP3 over SSL/TLS"
clientConfig.outgoingProtocols="SMTP over SSL/TLS"
Also we did customize the DNS records somewhat to make this work:
_imaps._tcp.example.com. SRV webmail.example.com.
Weight: 1
Prio: 0
Port: 993
_imap._tcp.example.com. SRV webmail.example.com.
Weight: 1
Prio: 10
Port: 143
_pop3s._tcp.example.com. SRV webmail.example.com.
Weight: 1
Prio: 20
Port: 995
_smtps._tcp.example.com. SRV webmail.example.com.
Weight: 1
Prio: 0
Port: 465
Hello guys,
i enabled the autoconfig / autodiscover staff and it works well so far, but i have on point i want to change, is there a way to change the port from 465 to 587 in the autoconfig response for smtp?
I always get:
<Protocol>
<Type>SMTP</Type>
<Server>mail.example.com</Server>
<Port>465</Port>
<DomainRequired>off</DomainRequired>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
<LoginName>auto@example.com</LoginName>
</Protocol>
But i want to get port 587
<Protocol>
<Type>SMTP</Type>
<Server>mail.example.com</Server>
<Port>587</Port>
<DomainRequired>off</DomainRequired>
<SPA>off</SPA>
<SSL>on</SSL>
<AuthRequired>on</AuthRequired>
<LoginName>auto@example.com</LoginName>
</Protocol>
All the best
Michael
Hi, just a quick one, is Plesk already at a point where we can specify the outgoing port as 465, or 587 in the [mail] section of panel.ini, or is that still work in progress?
Half an hour searching for the answer send me round in loops. Nothing in the change logs either.
Addition/Clarification: The servers have already for years been set up to use the submission port. Were the submission port disabled, Plesks default choice of port 465 makes sense. However as the port is enabled, it would be nice to have the ability to set it so using the panel.ini .
Last I saw in the forum was a workaround using a script that runs after every update and adjusts settings deep inside Plesk. Hence my above question.
Regarding the mail autoconfiguration DNS SRV records that this article refers to, I wanted to point out that "_smtps._tcp" is incorrect. The correct SRV record should be: _submissions._tcp
See RFC 8314 (https://datatracker.ietf.org/doc/html/rfc8314) for more details.
This should be corrected in Plesk, as an incorrect DNS SRV record for _smtps._tcp is created for each subscription that has mail autoconfiguration enabled.
This link is not working from your guide
If you need to enable autodiscover for all domains follow the article #360012848199
Hello Robert Krölls,
Thank you for your comment.
The article should become visible now. Please check it from your side: https://support.plesk.com/hc/en-us/articles/360012848199.
Hello Bob Benson,
Thank you for reporting this.
I've contacted the developers and they've confirmed the bug with ID PPPM-13499. You may follow this article or track our Change log to be aware of the changes.
Please sign in to leave a comment.