• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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