-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Cannot send notification using smtp: timed out #1970
Description
Describe the bug
Cannot send notifications using Google's SMTP service.
Steps to reproduce
- Configure watchtower using docker-compose as per https://containrrr.dev/watchtower/notifications/
version: "3.8"
services:
watchtower:
container_name: watchtower
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
environment:
WATCHTOWER_NOTIFICATIONS: email
WATCHTOWER_NOTIFICATION_EMAIL_FROM: myuser@domain.com
WATCHTOWER_NOTIFICATION_EMAIL_TO: me@domain.com
WATCHTOWER_NOTIFICATION_EMAIL_SERVER: smtp.gmail.com
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT: 587
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER: myuser@domain.com
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD: app password
WATCHTOWER_NOTIFICATION_EMAIL_DELAY: 2
- docker-compose up
- Receive the following error:
`watchtower | time="2024-04-30T03:54:12Z" level=error msg="Failed to send shoutrrr notification" error="failed to send using smtp: timed out" index=0 notify=no service=smtp``
Can access smtp.gmail.com just fine:
$ ping smtp.gmail.com
PING smtp.gmail.com (142.251.10.108) 56(84) bytes of data.
64 bytes from sd-in-f108.1e100.net (142.251.10.108): icmp_seq=1 ttl=56 time=107 ms
64 bytes from sd-in-f108.1e100.net (142.251.10.108): icmp_seq=2 ttl=56 time=107 ms
64 bytes from sd-in-f108.1e100.net (142.251.10.108): icmp_seq=3 ttl=56 time=108 ms
$ telnet smtp.gmail.com 587
Trying 74.125.68.108...
Connected to smtp.gmail.com.
Escape character is '^]'.
No email notifications are ever received.
Expected behavior
Receive email notifications via Gmail's SMTP server.
Screenshots
No response
Environment
- Platform: Debian GNU/Linux 12 (bookworm)
- Architecture: 64 bit
- Docker Version: 20.10.24+dfsg1, build 297e128
Your logs
watchtower | time="2024-04-30T04:06:22Z" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
watchtower | time="2024-04-30T04:06:23Z" level=debug msg="Making sure everything is sane before starting"
watchtower | time="2024-04-30T04:06:23Z" level=debug msg="Retrieving running containers"
watchtower | time="2024-04-30T04:06:23Z" level=debug msg="There are no additional watchtower containers"
watchtower | time="2024-04-30T04:06:23Z" level=debug msg="Watchtower HTTP API skipped."
watchtower | time="2024-04-30T04:06:23Z" level=info msg="Watchtower 1.7.1"
watchtower | time="2024-04-30T04:06:23Z" level=info msg="Using notifications: smtp"
watchtower | time="2024-04-30T04:06:23Z" level=info msg="Checking all containers (except explicitly disabled with label)"
watchtower | time="2024-04-30T04:06:23Z" level=info msg="Scheduling first run: 2024-05-01 04:06:23 +0000 UTC"
watchtower | time="2024-04-30T04:06:23Z" level=info msg="Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"
watchtower | time="2024-04-30T04:06:35Z" level=error msg="Failed to send shoutrrr notification" error="failed to send using smtp: timed out" index=0 notify=no service=smtp
Additional context
No response