• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Autodiscover/Autoconfig SMTP port

Geraldo V Vieira

New Pleskian
Hi

dose anyone know how to force autodiscover/auto config to use port 587 instead of 465? I have changed the settings for clientConfig.smtpPortEncrypted in panel.ini to 587 but it's still using 465.
 
This functionality is yet to be implemented by Plesk. There is a feature suggestion created on Plesk UserVoice page:

Fully Customizable Autodiscover Settings

As a possible workaround, you can use the following instruction:

Modify the autodiscover configuration files /usr/local/psa/admin/htdocs/mailconfig/autodiscover.xml and /usr/local/psa/admin/htdocs/mailconfig/autoconfig.xml and perform it automatically with an event handler after Plesk Update:

  1. Create the file /root/autodiscover_587.sh with the following content:
    Code:
    #!/bin/sh
    
    # set port 587 for Plesk autodiscover
    sed -i 's/{{SMTP_PORT}}/587/g' /usr/local/psa/admin/htdocs/mailconfig/autodiscover.xml
    sed -i 's/{{SMTP_PORT}}/587/g' /usr/local/psa/admin/htdocs/mailconfig/autoconfig.xml
  2. Make the file created in step 2. executable:
    Code:
    # chmod 755 /root/autodiscover_587.sh
  3. Execute the script one time:
    Code:
    # sh /root/autodiscover_587.sh
  4. Log in to Plesk Interface and navigate to Tools & Settings > Event Manager
  5. Create an event handler by clicking Add Event Handler with the following settings:
mceclip0.png
 
Hi IgorG

Thank you so much for replying to my question. The above worked very well for iPhones with the built in email client. Of course, I added the following for iPhones:

PHP:
sed -i 's/{{SMTP_PORT}}/587/g' /usr/local/psa/admin/htdocs/mailconfig/email.mobileconfig

But when using Outlook or Android, it doesn't work. It fetches all the settings information, but with port 465. I made sure that autodiscover.xml and autoconfig.xml both have port 587 set, and I also made sure that the DNS setting for _smtps._tcp.example.com also had port 587 set. When trying to setup on Outlook or Android, it still fetches port 465 still. Any idea why that is?
 
Hi, can confirm that on Android 10, Samsung phone with builtin email client, it uses 465 instead of the specified 587
 
Back
Top