SMTP time out, even though details are correct

Checklist
I have read intro post: About the Installation Issues category
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue

After the initial issues with the main setup & installation, I went through the healthcheck and setup wizard.

Once I got to the ‘checking status’ page (last before completion) the website refreshed and asked me to provide my email address to verify.

It’s not sending any emails and when I ran a test email using the CLI, I get the following error:
putty_VrHRubIvHG

I have double checked, and confirmed with my SMTP host that the credentials are correct. What could be the issue?

Hi @Shifty,

You are using the incorrect SMTP details for gmail.

There are a few things to sort out.

Enable 2FA then create an APP Password for your gmail account.

You can follow the instructions provided by Google:

Then the correct SMTP details for Gmail would be as follows:

  • SMTP Server Address: smtp.gmail.com
  • SMTP username: example@gmail.com
  • SMTP password: Your Gmail App Password
  • SMTP port (TLS): 587
  • SMTP (TLS/SSL) required: Yes

EDIT: Added URL for more information

Regards,
Bond

I’m not using gmail.

Gmail is just my personal email. :slight_smile:

Not a problem.

Are you able to test and check if your mail server is online ?

“Error: SMTP Timeout”

That means it is unable to reach your mail server located at mail.pdom.icu

Are you able to run a HELO test?

Regards,
Bond

Yes, the server is online.

What on earth is a HELO test?

That’s how developers test to check the response of the mail server. For more information.

Are you able to contact your mail server admin ?

In your passbolt error log directory, you should have an cli-error log. Can you perhaps post it here.

I am going to need to see more information on the error. As “Error: SMTP Timeout” is not enough as you said the mail sever is online.

Could you perhaps also try to ping the mail server and post it’s response.

ping mail.pdom.icu

You can cancel it after 10 returns.

Regards,
Bond

Can you try to run the debug email shell with the option --verbose

That would display a verbose output.

The command would be as follows:

su - www-data -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt send_test_email --verbose"

Then post the result of that here. That would give me sufficient amount of information to debug what is the error with sending the email.

Regards,
Bond

Hi @Shifty ,

I am able to reach your SMTP server:

So I confirm your SMTP server is up and running.

The problem is between your passbolt server and the SMTP server. If you get a timeout, it means there is a firewall somewhere who is blocking the request.

In your previous post, you said:

I’m using a cloud flare tunnel to do the domain side of things as my Virgin broadband router won’t allow port forwarding and I don’t control what router we use as i live in rented accommodation and I’m not the landlord.

I’m pretty sure your issue is maybe this Virgin broadband router who blocks port 465/TCP.

Cheers,

1 Like

Hi there!

Sorry for the delay in reply, Life got a little bit busy.

My SMTP host suggested trying port 25 and 587. Funnily enough 25 worked straight away… Who knows if 465 is blocked.

Thanks.

I have this exact same issue. Passbolt passes all healthchecks but does not send emails (SMTP Timeout). I have another app running on same server with same smtp credentials and settings that is able to send emails.
The non-TLS version works fine though.

Hello @aybhalala, welcome to the forum :slight_smile:

Port 465 is a deprecated standard for SMTP, while many providers still do support 465 for SMTP, it’s no longer an accepted standard, as it is mentionned here

Please, if you have any other issues feel free to create a new thread, thanks.

Hello
I have a similar problem with the installation. I have tried different smtp servers and ports. It didn’t work out. 2FA is set up
Email could not be sent: stream_socket_client(): Unable to connect to tcp://smtp.gmail.com:587 (Connection timed out)
Debian 12

Hi, :wave:

It means you have a firewall somewhere in your network who is blocking the connection.

Best,

Thanks The firewall has checked, everything is allowed. The ping to the server is going through. What else can I check?

PING smtp.gmail.com (74.125.131.108) 56(84) bytes of data.
64 bytes from lu-in-f108.1e100.net (74.125.131.108): icmp_seq=1 ttl=113 time=4.34 ms

I assume the port 587 on TCP protocol is blocked by your firewall. From your passbolt server, you can test with this command:

telnet smtp.gmail.com 587

This will test TCP connectivity on port 587 for smtp.gmail.com. Here is the output for me:

Thanks! The problem was on my provider’s side. For some reason, they blocked these ports bypassing the firewall.

Cool :sunglasses: enjoy your passbolt journey :slightly_smiling_face:

1 Like