Question
Is it possible to make mail autodiscover in Plesk use port 587 by default instead of port 465?
Answer
This functionality is yet to be implemented by Plesk. There are a couple of feature suggestions created on Plesk UserVoice portal, consider voting for them:
https://plesk.uservoice.com/forums/184549-feature-suggestions/suggestions/39949069
Top-voted suggestions on UserVoice are considered by Plesk development team for implementing in future Plesk versions.
Workaround
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:
-
Connect to the server using SSH.
-
Create the file
/root/autodiscover_587.sh
with the following content:#!/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 -
Make the file created in step 2 executable:
# chmod 755 /root/autodiscover_587.sh
-
Execute the script one time:
# sh /root/autodiscover_587.sh
-
Log into Plesk and go to Tools & Settings > Event Manager.
-
Create an event handler by clicking Add Event Handler with the following settings:
-
Click OK.