• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Centos 7 Plesk 12.5 SMTP Email issue

Twincarb

New Pleskian
Hi,

I have a clean built Centos 7.2.1511 with Plesk 12.5 installed on it. This is the first Centos 7 + Plesk I have used, I am more used to Centos 6.7 with Plesk.

I have got several domains which contain Joomla and Wordpress sites, when either site is set up to use SMTP for email sending with SSL or TLS SMTP Authentication set to yes I get the following error.
Code:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
When the same is configured not to use authentication the emails are able to pass without any problems.

Ok So I take a step back and open an SSH window
Code:
openssl s_client -starttls smtp -crlf -connect smtp.gmail.com:587
This appears to work as expected I get the certificate returned and all the good stuff finishing with
Code:
Verify return code: 0 (ok)

Do the same with
Code:
openssl s_client -starttls smtp -crlf -connect smtp.office365.com:587
This time it returns
Code:
getaddrinfo: Name or service not known - connect:errno=0

If I then do a quick ping to get a valid IP for smtp.office365.com and use that in place of smtp.office365.com again it works as expected and returns the certificate all the good stuff finishing with
Code:
Verify return code: 0 (ok)
I have had a look in maillog and nothing is screaming out to me anything obvious. Any hints or suggestions would be warmly welcomed. I have had a look over similar posts but not able to find anything that helps.
Regards
 
Code:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
That error say the script cannot connect you YOUR SMTP server... not a remote one... check the port you use for connect... passwds.. etc...
 
The port and the connection details, all appear to be set up correctly. To test it from command line I ran...
# dig +short smtp.office365.com
The response back is...
Code:
smtp.outlook.office365.com.
outlook.office365.com.
lb.geo.office365.com.
outlook.office365.com.g.office365.com.
outlook-emeawest2.office365.com.
132.245.226.242
132.245.213.50
132.245.31.242
132.245.225.98
132.245.57.18
132.245.211.242
132.245.34.242
132.245.69.66
132.245.59.178
157.56.255.226
I then change within Joomla the SMTP host from smtp.office365.com to outlook-emeawest2.office365.com
I keep the connection settings identical, same port same username same password.
Result is the email is sent correctly, the only issue with using this method is that it's not the correct address to use.

Again in WordPress on the same server I need to change smtp.office365.com to outlook-emeawest2.office365.com

This work around isn't required on any other server that I look after the only difference is this one is using Centos 7 rather then 6
 
Back
Top