Connection timed out when trying to send email using gmail

Hello everyone,

I saw a lot of topics about that but didn’t find the issue :frowning:

I have a fresh new install of debian 9 and passbolt. Everything is working fine except the mails. I enabled the access for the less secured apps on gmail.

When I want to send a test, I have an error :

root@passbolt:/var/www/passbolt# ./bin/cake passbolt send_test_email

 ____                  __          ____
/ __ \____  _____ ____/ /_  ____  / / /_

/ // / __ `/ / / __ / __ / / _/
/ / // ( |
) /
/ / /
/ / / /
/
/ _
,
/
//.__/__//_/

Open source password manager for teams

Debug email shell

Email configuration

Host: smtp.gmail.com
Port: 587
Username: my@gmail.com
Password: *********
TLS: true

Sending email from: Passbolt my@gmail.com
Sending email to: doesnotexist@passboltdummydomain.com

Trace

A test email could not be sent.
Error: Connection timed out

This is the passbolt.php :

'EmailTransport' => [
    'default' => [
        'host' => 'smtp.gmail.com',
        'port' => 587,
        'username' => 'theoallin1991@gmail.com',
        'password' => 'mypassword',
        // Is this a secure connection? true if yes, null if no.
        'tls' => true,
        'timeout' => 30,
        'client' => null,
        'url' => null,
    ],
],
'Email' => [
    'default' => [
        // Defines the default name and email of the sender of the emails.
        'from' => ['informatique@see.com' => 'Passbolt'],
        //'charset' => 'utf-8',
        //'headerCharset' => 'utf-8',
    ],
],

I can ping the smtp relay :

root@passbolt:/var/www/passbolt# ping smtp.gmail.com
PING gmail-smtp-msa.l.google.com (74.125.71.108) 56(84) bytes of data.
64 bytes from wn-in-f108.1e100.net (74.125.71.108): icmp_seq=1 ttl=46 time=11.8 ms
64 bytes from wn-in-f108.1e100.net (74.125.71.108): icmp_seq=2 ttl=46 time=11.9 ms
64 bytes from wn-in-f108.1e100.net (74.125.71.108): icmp_seq=3 ttl=46 time=11.9 ms
^C
gmail-smtp-msa.l.google.com ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 11.878/11.909/11.935/0.023 ms

No error found with the healthcheck command.

This is the logs :

www-data@passbolt:~/passbolt/logs$ cat cli-debug.log
2018-07-04 07:41:30 Notice: Notice (8): Trying to get property of non-object in [/var/www/passbolt/src/Template/Email/html/AN/user_register_self.ctp, line 22]

www-data@passbolt:~/passbolt/logs$ cat cli-debug.log
2018-07-04 07:41:30 Notice: Notice (8): Trying to get property of non-object in [/var/www/passbolt/src/Template/Email/html/AN/user_register_self.ctp, line 22]

www-data@passbolt:~/passbolt/logs$ cat error.log
2018-07-02 13:34:36 Error: [Cake\Network\Exception\BadRequestException] The OpenPGP key data is not valid.
Request URL: /users/validateAccount/4a48f59d-5c93-4463-9a95-0baa7847cb45.json?api-version=v1
2018-07-02 13:41:40 Error: [Cake\Network\Exception\BadRequestException] The OpenPGP key data is not valid.
Request URL: /users/validateAccount/4a48f59d-5c93-4463-9a95-0baa7847cb45.json?api-version=v1
2018-07-02 13:49:45 Error: [Cake\Network\Exception\BadRequestException] The OpenPGP key data is not valid.
Request URL: /users/validateAccount/0413951d-59f1-4f47-b767-f95725a8e120.json?api-version=v1
2018-07-04 06:52:00 Error: [Cake\Routing\Exception\MissingRouteException] A route matching “/account/settings.json” could not be found.
Request URL: /account/settings.json?api-version=v2
2018-07-04 06:57:50 Error: [Cake\Routing\Exception\MissingRouteException] A route matching “/account/settings.json” could not be found.
Request URL: /account/settings.json?api-version=v2

Thanks for your time.

Hi @tgordyjan

Your setup seems correct at first glance. Looks like a network issue. Is it possible that you have SMTP egress traffic blocked?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.