• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/
  • On Plesk for Linux mod_status is disabled on upgrades to improve Apache security.
    This is a one-time operation that occurs during an upgrade. You can manually enable mod_status later if needed.

Resolved SMTP connection timeout

Harun

New Pleskian
Server operating system version
Debian 11
Plesk version and microupdate number
Plesk Obsidian 18.0.74 Update #3 Web Host Edition
I'm running wordpress sites on my Debian 11 cloud server. I'm trying to set up worpdress on mydomain1.com to send system emails using the email address [email protected] which is also set up on this same server. I am getting the error: SMTP Error: Could not connect to SMTP host. Failed to connect to server SMTP server error: Failed to connect to server SMTP code: 110 Additional SMTP info: Connection timed out

Host mydomain1.com
port 587
TLS

[email protected] is set up as "Do not deliver copies of forwarded emails to the Plesk mailbox "

Any ideas? Is there a complete step-by-step guide of how to set this up somewhere?
 
Hi Harun

There's probably an error in the SMTP settings I'm using in WordPress. Install the "WP MAIL SMTP" plugin in WordPress and try these settings under the "Other SMTP" option:
mail.mydomain1.com
Port: 465/SSL
Auto SSL/TLS Option: Off

These options are active for some of our clients.

Have a good day
 
Hi Harun

There's probably an error in the SMTP settings I'm using in WordPress. Install the "WP MAIL SMTP" plugin in WordPress and try these settings under the "Other SMTP" option:
mail.mydomain1.com
Port: 465/SSL
Auto SSL/TLS Option: Off

These options are active for some of our clients.

Have a good day
Unfortunately, I still receive:

SMTP Error: Could not connect to SMTP host. Failed to connect to server SMTP server error: Failed to connect to server SMTP code: 110 Additional SMTP info: Connection timed out

Host: mail.mydomain1.com
Port: 465
SMTPSecure: ssl
SMTPAutoTLS: bool(false)
SMTPAuth: bool(true)

Doesn't the timeout error likely mean that there is no server available to connect? I double-checked DNS to the best of my knowledge and used MX toolbox. I do get "SMTP Reverse DNS Mismatch" -- is this necessary or outdated? I do have multiple domains at this server/IP so I don't want smtp for mydomain2.com to stop working.

Thanks for your response!
 
Port 587 requires STARTSSL/STARTTLS, won't work on SSL/TLS. Options: change port to 465 or 25 (without SSL/TLS, you don't need that anyway if the connection stays on your own server).
Unfortunately, I get the same error on all three of those ports. My understanding of the timeout error is that it's not connecting to the server to begin with, which I thought means it's not at the point of requesting authorization for a port.

Thank you for your reply!
 
You can try "localhost" instead of the real hostname.
Unfortunately, I get an error using localhost.

ErrorInfo: SMTP Error: Could not connect to SMTP host. Failed to connect to server SMTP server error: Failed to connect to server
Host: localhost

Thank you for your reply!
 
It's either the host name or a ban on localhost IP connecting to the SMTP server. First try "localhost" instead of the public domain name.
 
It's either the host name or a ban on localhost IP connecting to the SMTP server. First try "localhost" instead of the public domain name.
Unfortunately, I get the same error using localhost. I checked trusted IP addresses in Fail2Ban, and 127.0.0.1/8 is included. Does that eliminate banned localhost IP as a theory, or should I investigate something else?
 
Hi @Harun ,

Let me add to @Bitpalast 's suggestion: I think it would be more logical to start with simple solutions and then move on to more complex ones.

1. Is the SMTP service active?
2. Is your email password correct? You can try resetting the password for the relevant email account via the Plesk panel and using the new password. (Test with the settings I initially suggested.)
3. If it still doesn't work, check where the MX records for the relevant domain are going on intodns.com.
4. If everything seems correct, is there a port restriction on the server's firewall or the hosting service?

Have a good day
 
Hi @Bitpalast

I've never previously configured "localhost" in WordPress SMTP settings. Instead of writing "mail.mydomain1.com" in the SMTP server settings, I'm trying to write "localhost". I'm not sure if this setting works.

I can only guess that when "localhost" is entered, it might go to Plesk's webmaster(or root)@localhost SMTP box. Therefore, there might not be an SMTP connection from the desired email address "mail.mydomain1.com".
 
So mail.mydomain1.com was hosted elsewhere, not on the same server where the website is? That of course explains why so many iterations where needed to solve the case. I was certainly assuming that mail.mydomain1.com is hosted on the same server where the website is hosted.
 
Hi @Bitpalast

I've never previously configured "localhost" in WordPress SMTP settings. Instead of writing "mail.mydomain1.com" in the SMTP server settings, I'm trying to write "localhost". I'm not sure if this setting works.

I can only guess that when "localhost" is entered, it might go to Plesk's webmaster(or root)@localhost SMTP box. Therefore, there might not be an SMTP connection from the desired email address "mail.mydomain1.com".
I got an error using localhost. I'm using the mail subdomain and it works now.
 
So mail.mydomain1.com was hosted elsewhere, not on the same server where the website is? That of course explains why so many iterations where needed to solve the case. I was certainly assuming that mail.mydomain1.com is hosted on the same server where the website is hosted.
I have smtp and wordpress sites running on one server. However, DNS records are on Cloudflare and I am using Cloudflare name servers. The mail subdomain A record was proxied, which apparently is not supposed to be. Even though the mail A record content was my true server IP address, it was showing up as Cloudflare's IP. Once I changed that, the mail subdomain worked.

I accidentally said earlier that the MX record was proxied, that wasn't the case. Cloudflare does not allow MX records to be proxied. I used MX toolbox to lookup the A record for the mail subdomain, that was proxied in Cloudflare.
 
Back
Top