Applicable to:
- Plesk Obsidian for Linux
Question
How to enable / manage / verify mail autodiscover functionality in Plesk Obsidian?
Answer
Warning: Outlook 2016/2019/Office 365 supports autodiscover for IMAP/SMTP protocols starting with Plesk Obsidian 18.0.25.
-
Go to Tools & Settings > Mail Server Settings > Settings tab > General options > Enable the Enable mail autodiscover option:
Note: if the option is not visible it means that Plesk Premium Email is installed, which has its own autodiscovery mechanism [BUG] Mail autodiscover option is not visible in Mail Server Settings
-
If Nginx is not installed on the server, go to Tools & Settings > Apache Web server > Enable the proxy_http module > Click OK to apply the changes
-
(Optional) in Plesk > Tools & Settings > Mail Server Settings enter domain name in "Specify a custom domain name for mail autodiscover" field.
-
Manage the mail autodiscover at Domain or Service Plan level:
5.1- Go to Domains > example.com > Mail Settings tab > Enable the option Enable mail autodiscover > Click OK to enable the mail autodiscover for the domain:
5.1- Go to Service Plans > Service Plan Name > Permissions tab > click Show more permissions > Enable the Mail autodiscover management option > Click on Update & Sync to grant permissions to a subscription owner to enable or disable the mail autodiscover:
5.2- Go to Service Plans > Service Plan Name > Mail tab > Enable the option Enable mail autodiscover > Click on Update & Sync to enable the mail autodiscover for all the subscriptions synchronized with the service plan:
6. Install a valid SSL certificate in the domain
7. (Optional) Verify if the mail autodiscover is available for the different mail clients:
7.1- Create XML file customizing the EMailAddress
parameter:
# cat request.xml
<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/requestschema/2006">
<Request>
<EMailAddress>jdoe@example.com</EMailAddress>
<AcceptableResponseSchema>
http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006
</AcceptableResponseSchema>
</Request>
</Autodiscover>
7.2- Perform a POST request with the file request.xml
to the URL https://<domain-name>/autodiscover/autodiscover.xml
and the sever will return the following response:
Warning: If the following command fails with certificate subject name
does not match target host name
make sure to install a valid SSL on the domain
# curl -d @request.xml -u jdoe@example.com 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>jdoe@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>jdoe@example.com</LoginName>
</Protocol>
<Protocol>
...
</Protocol>
</Account>
</Response>
</Autodiscover>
7.1 - Perform a GET request customizing the emailaddress
parameter to the URL https://<domain-name>/mail/config-v1.1.xml?emailaddress=<email-address>
and the sever will return the following response:
Warning: If the following command fails with certificate subject name
does not match target host name
make sure to install a valid SSL on the domain
# curl https://example.com/mail/config-v1.1.xml?emailaddress=jdoe@example.com
<clientConfig version="1.1">
<emailProvider id="example.com">
<domain>example.com</domain>
<displayName>jdoe@example.com</displayName>
<displayShortName>jdoe@example.com</displayShortName>
<incomingServer type="imap">
<hostname>example.com</hostname>
<port>993</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>jdoe@example.com</username>
</incomingServer>
<outgoingServer type="smtp">
<hostname>example.com</hostname>
<port>465</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>jdoe@example.com</username>
</outgoingServer>
<incomingServer type="pop3">
<hostname>example.com</hostname>
<port>995</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>jdoe@example.com</username>
</incomingServer>
</emailProvider>
</clientConfig>
Note: If DNS is managed externally it will be needed to create SRV records manually there:
CONFIG_TEXT: _imaps._tcp.example.com. SRV mail.example.com.
_pop3s._tcp.example.com. SRV mail.example.com.
_smtps._tcp.example.com. SRV mail.example.com.
Additional information
Check the following table for details on how the feature works depending on the checkboxes enabled/disabled:
Permissions > Mail autodiscover management | Mail > Enable mail autodiscover | For new domains | For existing domains |
---|---|---|---|
Enabled | Disabled |
|
|
Disabled | Enabled |
|
|
Disabled | Disabled |
|
|
Comments
62 comments
Ok that sounds pretty nice, but what i have to change in DNS or so if the plesk server isnt my DNS Server.
Do i have to make subdomains like autodiscover.domain.tld and autoconfig.domain.tld and give them a A-Record to my Plesk Server, or how that all work?
greetz Alex
Hi Alexander, should work right away after you enable it basically, because Outlook and Thunderbird do requests to URLs like https://<domain>/autodiscover/autodiscover.xml and https://<domain>/mail/config-v1.1.xml?emailaddress=<address. Means you don't need record autodiscover.domain.tld, you just need your A record for domain.tld
Obsidian 18.021 #3
Thunderbird works perfect
Outlook 2016 doesn't
Android 5.1.1 doesn't
Will test further in the next few days. Running the tests as above to verify show the correct result. Done some research, but couldn't find a reason. Any pointers?
Hello,
Parahoster / Thibaut Robert
Could you, please, provide more information about what you're trying to achieve so that we could make sure that the answer is precise?
TomBob
Are there any errors displayed in Outlook or Android mail client? Also, it's worth checking /var/log/maillog
Hey Ivan Postnikov,
Yeah no problem.
For exemple.
One of my client use his domaine : www.exemple.com and when he try to configure by his mail software (like outlook). The discover show info like this
Input : exemple.com:993
Output : exemple.com:465
But I need to customize this data for using my correct server certificat as : myserver.com:465 ans myserver.com:993
Where Can I change this parameter of the autodiscover ?
Thanks
Hi Ivan,
I have the same problem. I installed Plesk yesterday using the one-click-installer on a Ubuntu 18.04 server. The problem is the Preferred domain setting. I added my domain e.g. "example.com" and set the preferred domain to: www.example.com. When executing the GET request like Thunderbird does, I noticed the following response chain:
Redirect (0.090s) - https://example.com/mail/config-v1.1.xml?emailaddress=info@example.com
Server: nginx Date: Thu, 05 Dec 2019 09:03:04 GMT Content-Type: text/html Content-Length: 162 Connection: keep-alive Location: https://www.example.com/mail/config-v1.1.xml?emailaddress=info@example.com X-Powered-By: PleskLin
-------------------------------------
Response (0.077s, total time 0.126s) - https://www.example.com/mail/config-v1.1.xml?emailaddress=info@example.com
<clientConfig version="1.1"> <emailProvider id="example.com">
....
</emailProvider> </clientConfig>
When I execute the POST request, my first response is again the redirect to "www.example.com" but the second response is: 400 - Bad Request.
If I change the preferred domain to "none" it's working.
Hello Parahoster / Thibaut Robert
As I can see, you've already submitted a ticket to us to check this in detail.
Here's the reply from our agent:
In order to change default parameters, you should edit the file which the mail client requests during the process.
The file is different for thunderbird or Outlook.
https://<domain>/autodiscover/autodiscover.xml
https://<domain>/mail/config-v1.1.xml?emailaddress=<address>
orhttps://<domain>/.well-known/autoconfig/mail/config-v1.1.xml?emailaddress=<address>
On this page you have examples containing the same information: How to manage mail autodiscover in Plesk Obsidian?
In case of additional issues/questions, feel free to reply back to the ticket.
I've got the same problem, but the answer from the agent is not the solution:
The autodiscover will send <domainname> as mailserver to the emailclient.
But, in our case <domainname> is not the correct mailserver.
For all domains on this plesk-installation it has to be mailserver.mycompany.de
How can I change the mailserver send to the mailclient using autodiscover?
Hello, @Michael. To avoid any misunderstandings and to reproduce the the exact issue you reported, please submit a ticket to Plesk Support https://support.plesk.com/hc/en-us and provide POST requests you are perform to reach "400 - Bad Request" as the output in the response.
Hello @Dennis, I have to inform you that Plesk Mail autodiscovery feature relies on domain name and not to server hostname, and this is cannot be changed.
Since in Plesk Obsidian SNI support is available now, it is possible to assign different SSL certificates to domains on a local mail servers. So if the certificate will be installed, there will be no warnings about insecure connection during setting up mail-client. https://support.plesk.com/hc/en-us/articles/115001446174-How-to-secure-a-Plesk-mail-server-with-different-SSL-certificates-SNI-support-
Dennis Scheidner Michael ability to specify a custom name as mail server for Mail autodiscovery has been implemented, and should become available in 18.0.23 update, scheduled for January-Feb, 2020.
@Anton Maslov Thats great. Thank you very much.
I was in the other post, sorry, here it belongs:
Hi,
I have tried it manually and then I found this thread about the configuration on board.
For me its lacking some infos probably. But I can not get the right MX domain picked from thunderbird.
ANd also it doesnt create any new folder under .well-known as I expected.
mail.mydomain.com is the host for incoming and outgoing Email, and the auto process only sees domain.com
My scenario is: The client domain has wildcard SSL installed and email is running fine. The domain is hosted on inwx.de and so with an external provider. On Plesk (latest, updated) no DNS running. When in Plesk I have performed all steps above, I had no success, only the domain.com is considered not mail.domain.com and also I would like to know how I can roll out after I made it work , to all existing email boxes??
All the best.
Andre
EDIT: Here are my DNS settings , where the MX in mail.domain.com is the same like in SRV and in the spif also, it has also everything green in the test I made.

Though the hosting panel runs on host.short.com
Screener attached and here.
Hello, @Andre.
As I see you have wildcard subdomains in DNS settings (with * symbol).
To enable mail autodiscover via HTTPS for these domains, create a wildcard subdomain in Plesk, get a wildcard SSL/TLS certificate, and secure the following with this certificate: the domain itself, the mail server, and the created wildcard subdomain. To secure the wildcard subdomain, go to its Hosting Settings and choose the wildcard certificate (the one that has the asterisk prefix *). Choosing the wildcard certificate for the wildcard subdomain is necessary because it will otherwise use the self-signed Plesk SSL/TLS certificate by default (even if a wildcard certificate was issued). Please refer to https://docs.plesk.com/en-US/obsidian/administrator-guide/65691/#limitations for more details. If this suggestion will not help you - please submit a ticket to Plesk Support https://support.plesk.com/hc/en-us
Hi @Alexey Lapshin, thanks for your kind reply. I only use and will use Let'sEncrypt Certs which are considered working fine in Plesk as the article youve linked me to implies.
So, and I have NO DNS running and wont make it run on plesk managed server as well.
Do I get you right, that I create a subdomain in plesk, taht is *.mydomain.com and directly related to the wildcard setting on the domain providers set up?
That would be like a "ghost subdomain" cause the mailboxes and the website and all is running under the webspace of mydomain.com with the MX setting of mail.mydomain.com...
Not quite sure if I got you right.
and in the mail settings of mydomain.com it was long time already selected as the securing cert.
Andre
EDIT: Interesting, I have not known about this option in sub-domains, cause I havent read the text above. But AM NOT ABLE to pick the lets encrypt radio button then when I have submitted an asterisk there
Hi @..., this seems to be correct now, as the domain and wildcard was already secured before. Now I set up the missing sub domain in Plesk, cant pick the cert again, but is anyway already issued.
EDIT:
Cool stuff, that these settings exist, but it still doesnt work. I guess it is due to what will be corrected in version 18.0.22 like told here https://talk.plesk.com/threads/mail-setup-in-outlook.354556/
While I still have to care for the issue that my hostname is host.MAINDOMAIN.com and my mail server name is mail.CLIENTdomain.com
So, in fact I probably need to use all mail server setups with the hostname on which plesk is running, right?
And then, if that all works, for NEW boxes then... How can I roll it out beneath all existing boxes?
Hello, Andre.
Please find below answer on the questions:
> So, in fact I probably need to use all mail server setups with the hostname on which plesk is running, right?
Since in Plesk Obsidian SNI support is available now, it is possible to assign different SSL certificates to domains on a local mail servers. You can specify domain name as mail server.
> And then, if that all works, for NEW boxes then... How can I roll it out beneath all existing boxes?
For existing mailboxes it is not required to reconnect mailclient, because the Plesk process all autodiscover request sends by mail client https://support.microsoft.com/en-in/help/3211279/outlook-2016-implementation-of-autodiscover.
Hi,
this sounds like great news.
And the settings in Panel.ini for [mail]?
I dont want it to display wrong vaalues in case one user reads the note.
Now, it simply takes te hostname which is host.MYdomain.com, but the placeholder shall display mail.CLIENTdomain.com
cause that is set in inwx ...
I had tried with mail.<domain> but it had no effect.
EDIT: Okay, this I found out and works, the extension Panel.ini doesnt do its job and its not saved, must be done by hand. Then it works in the labels about Email setup.
The autodiscover still dont work sadly, @...
Hello @Andre Lisbert,
Could you please clarify what was added to [mail] section in panel.ini?
This is settings from the test server:
[mail]
autoconfig.enabled = true
autoconfig.url = http://127.0.0.1:8880
Also, does the autodiscovery did not work in Thunderbird only or in Microsoft Outlook as well?
Well, on both it didnt work. I checked with windows 10 outlook (also subscribed to office 365)
And i didnt know that this panel setting was needed at all. The description of plesk in this matter lacks utmost all. I ve told them already, that its maybe better to have a instruction ready available at the time of rolling out a feature.
So, what to do?
Hi Andre, please create a support ticket to check the issue, your case not trivial and article comments is not quite good for troubleshooting:
https://support.plesk.com/hc
When I go to "2.1- Go to Tools & Settings > Mail Server Settings > Settings tab > General options > Enable the Enable mail autodiscover option:" I can't find the "Enable mail autodiscover option". I've just updated to 18.0.21, rebooted the server but it's still not showing.
Maybe removing all mail services and reinstalling?
Hi Anton Maslov Am confused of the why. Nearly all settings are done. Cannot be much, can it
Gonna ask at plesk (but am using a hosted license) and also my provider (who in the past already had once sent me away to plesk directly. Hope it works.
Gonna date up.
Vladimir Chernikov Hi, what is the COrrect setting then? of this:
[mail]
autoconfig.enabled = true
autoconfig.url = http://127.0.0.1:8880
----
Alll the best and thanks,
Andre.
Hi Carlos Marchi Could you please open a support ticket with us so we can take a look at the logs?: https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support-
I am facing the same problem as Carlos Marchi: when reaching point 2.1. of instructions above, there is no option 'Enable mail autodiscover' on Plesk Obsidian 18.0.21 Update #5 on Debian 9.11
EDIT: i found the solution by myself... modifying the panel.ini via Panel.ini Editor makes the option available. "autoconfig.enabled = 1"
Sascha Schlüter We have encountered some scenarios where Plesk Premium Email would set "autoconfig-enabled = 0" which in turns removes Autodiscover from the UI.
If this was your case thanks for sharing the resolution. If not please open a support ticket with us so we can troubleshoot: https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support-
Hi,
I was short before solving the problem.
My plesk subsrciption is part of a my hosting providers' license.
And I could (!) solve it over their subscription key, they have no issue.
But as I was SHORT before solving it here, why is my solution interrupted? This is a support desk, or not? Kindly follow up with my question:
Hi, what is the correct setting then? of this:
[mail]
autoconfig.enabled = true
autoconfig.url = http://127.0.0.1:8880
Julian Bonpland Mignaquy
and Vladimir Chernikov
@Andre Lisbert
> So, in fact I probably need to use all mail server setups with the hostname on which plesk is running, right?
Plesk Mail autodiscovery feature relies on domain name and not to the server hostname, and this is cannot be changed.
Outlook first does a DNS lookup for "SRV" record at _autodiscover._tcp.example.com to find the address of the autodiscover server, and then it tries to fetch XML file with all the required configuration over HTTPS from there.
But you have two autodiscover._tcp hosts with 465 and 993 ports specified. You need to remove extra autodiscover._tcp host and set the port to 443
> My plesk subsrciption is part of a my hosting providers' license.
As the license was purchased from a partner, you should contact them for support or purchase a support subscription to get support directly from Plesk.
Complex technical issues are better to be checked in scope of support tickets as it allows us to take a deeper look at the issue, involving server access if required.
For technical support questions please consider creating a technical support request.
How to submit a request to Plesk support?
How to get support directly from Plesk?
Hi, thank you a lot for your kind answer.
> Plesk Mail autodiscovery feature relies on domain name and not to the server hostname, and this is cannot be changed.
I dont want to connect it to the hostname of the server at all. It is my intention to have it working according the webhosting account users domain. In the DNS setting on inwx.de or any domain providers DNS I will set MX record to mail.userdomain.com and this should be used. But right now it only recognizes userdomain.com in the Incoming- and Outgoing mail server setup.
I will try this change on DNS becase the SRV record.
I opened a ticket using the installation key, which was denied by plesk. THat is making things EXTRA complicated in my eyes.
When I have the key I also pay so Plesk earns on this pay, maybe not in direct way, but this should be enough for me to get a little support. Especially when this support comes because a lack in documentation about one of their features.
And when the solution would be posted here, many others with similar setups would get help in public.
This way Plesk is using now makes me wanna move away, although this is the first issue, but heavy enough.
All the best.
Andre
Please sign in to leave a comment.