GMail SMTP stopped working

Checklist
I have read intro post: https://community.passbolt.com/t/about-the-installation-issues-category/12
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

Since a while back I noticed that I do no longer receive gmail emails from my Passbolt server.
Getting exception:

php_network_getaddresses: getaddrinfo for smtp.gmail.com failed: Temporary failure in name resolution"

Any tips on how to verify what could be wrong? I did not change the app password or any gmail settings. Only been updating Passbolt docker image and restarting the docker compose.

Currently running 4.10.1-1-ce

Hello @Depechie

I wanted to know which ports are you using for the configuration?

Hey @antony do you mean the docker port mapping? Currently I’m outbound mapping port 80 to 8180.

ports:
  - 8180:80

I was more thinking about the port you are using to configure SMTP e.g., 467

I suspect that your container is unable to translate smtp.gmail.com into an IP address. Are you able to ping it?

ping smtp.gmail.com

After censoring any sensitive data, could you share the full output of:

su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt send_test_email --recipient=YOUR_EMAIL -v" www-data 
# Please replace YOUR_EMAIL with the right one

Thanks in advance

Sure.

root@f4d2e92b77c5:/usr/share/php/passbolt# su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt send_test_email --recipient=*** -v" www-data

     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

 Open source password manager for teams
-------------------------------------------------------------------------------
 Debug email shell
-------------------------------------------------------------------------------
Email configuration
-------------------------------------------------------------------------------
Host: smtp.gmail.com
Port: 587
Username: ***
Password: *********
TLS: true
Sending email from: Passbolt <***>
Sending email to: ***
-------------------------------------------------------------------------------
Trace
Could not send the test email.
Error: php_network_getaddresses: getaddrinfo for smtp.gmail.com failed: Temporary failure in name resolution

Was unable to do the ping test inside the container, as ping is not an installed command on the image of Passbolt it seems.

From the host, I’m able to ping it.

> ping smtp.gmail.com
PING smtp.gmail.com (142.251.173.108) 56(84) bytes of data.
64 bytes from wi-in-f108.1e100.net (142.251.173.108): icmp_seq=1 ttl=57 time=18.2 ms
64 bytes from wi-in-f108.1e100.net (142.251.173.108): icmp_seq=2 ttl=57 time=19.1 ms
64 bytes from wi-in-f108.1e100.net (142.251.173.108): icmp_seq=3 ttl=57 time=14.5 ms
64 bytes from wi-in-f108.1e100.net (142.251.173.108): icmp_seq=4 ttl=57 time=14.6 ms
64 bytes from wi-in-f108.1e100.net (142.251.173.108): icmp_seq=5 ttl=57 time=16.0 ms

do you have a successful TLS handcheck with

docker exec -it passbolt bash
openssl s_client -connect smtp.gmail.com:587 -starttls smtp

also what do you have for

docker exec -it passbolt bash
apt-get update && apt-get install -y dnsutils
nslookup smtp.gmail.com
> openssl s_client -connect smtp.gmail.com:587 -starttls smtp
4077C678297F0000:error:10080002:BIO routines:BIO_lookup_ex:system lib:../crypto/bio/bio_addr.c:738:Temporary failure in name resolution
connect:errno=11

When trying the apt-get stuff the procedure will list several line like this

Ign:10 http://deb.debian.org/debian bookworm/main amd64 dnsutils all 1:9.18.28-1~deb12u2
Err:1 http://deb.debian.org/debian bookworm/main amd64 libuv1 amd64 1.44.2-1+deb12u1
  Temporary failure resolving 'deb.debian.org'
Err:7 http://deb.debian.org/debian bookworm/main amd64 bind9-libs amd64 1:9.18.28-1~deb12u2
  Temporary failure resolving 'deb.debian.org'
Err:8 http://deb.debian.org/debian bookworm/main amd64 bind9-host amd64 1:9.18.28-1~deb12u2
  Temporary failure resolving 'deb.debian.org'
Err:9 http://deb.debian.org/debian bookworm/main amd64 bind9-dnsutils amd64 1:9.18.28-1~deb12u2
  Temporary failure resolving 'deb.debian.org'
Err:10 http://deb.debian.org/debian bookworm/main amd64 dnsutils all 1:9.18.28-1~deb12u2
  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/libu/libuv1/libuv1_1.44.2-1%2bdeb12u1_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/f/fstrm/libfstrm0_0.6.1-1_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/j/jemalloc/libjemalloc2_5.3.0-1_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/l/lmdb/liblmdb0_0.9.24-1_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/libm/libmaxminddb/libmaxminddb0_1.7.1-1_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/protobuf-c/libprotobuf-c1_1.4.1-1%2bb1_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/b/bind9/bind9-libs_9.18.28-1%7edeb12u2_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/b/bind9/bind9-host_9.18.28-1%7edeb12u2_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/b/bind9/bind9-dnsutils_9.18.28-1%7edeb12u2_amd64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/b/bind9/dnsutils_9.18.28-1%7edeb12u2_all.deb  Temporary failure resolving 'deb.debian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

And it will not download the extra packages.
Seems something is off with reaching the internet through DNS I guess, only not sure why.

For reference… I found the solution, the resolv.conf file had a wrong IP as name server :confused:

1 Like