containrrr / watchtower

A process for automating Docker container base image updates.
https://containrrr.dev/watchtower/
Apache License 2.0
18.52k stars 832 forks source link

Header issue when sending an email #2026

Open Nael-Sayegh opened 1 day ago

Nael-Sayegh commented 1 day ago

Describe the bug

Hello, I am using the latest version of the Watchtower image. I have configured email sending with a Google Workspace setup. The problem is that Google blocks connections with a HELO localhost header. I need to be able to replace it with something else, such as a domain name. Is it possible to add this feature? The parameters provided are correct because I use them for sending mail via phpMailer. Thank you.

Steps to reproduce

  1. Configure email sending with Google
  2. Launch watchtower in debug mode
  3. Check the logs
  4. You should see an error like: watchtower | time="2024-09-17T15:54:00Z" level=error msg="Failed to send shoutrrr notification" error="error enabling StartTLS: 421 4.7.0 Try again later, closing connection. (EHLO)\n4.7.0 For more information, go to\n4.7.0 https://support.google.com/a/answer/3221692 a640c23a62f3a-a90610f5d31sm14603366b.104 - gsmtp" index=0 notify=no service=smtp

Expected behavior

Receive an email on my email address without errors in the log

Screenshots

No response

Environment

Your logs

watchtower    | time="2024-09-17T15:53:54Z" level=trace msg="created Shoutrrr URL from legacy notifier" URL="smtp://sender%40example.com:password@smtp-relay.gmail.com:587/?auth=Plain&fromaddress=sender%40example.com&fromname=Watchtower&subject=&toaddresses=myadress%40example.com"    
watchtower    | time="2024-09-17T15:53:54Z" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."          
watchtower    | time="2024-09-17T15:53:55Z" level=debug msg="Making sure everything is sane before starting"                                                
watchtower    | time="2024-09-17T15:53:55Z" level=debug msg="Retrieving running containers"                                                                 
watchtower    | time="2024-09-17T15:53:55Z" level=debug msg="There are no additional watchtower containers"                                                 
watchtower    | time="2024-09-17T15:53:55Z" level=debug msg="Watchtower HTTP API skipped."                                                                  
watchtower    | time="2024-09-17T15:53:55Z" level=info msg="Watchtower 1.7.1"                                                                               
watchtower    | time="2024-09-17T15:53:55Z" level=info msg="Using notifications: smtp"                                                                      
watchtower    | time="2024-09-17T15:53:55Z" level=info msg="Checking all containers (except explicitly disabled with label)"                                
watchtower    | time="2024-09-17T15:53:55Z" level=info msg="Scheduling first run: 2024-09-18 15:53:55 +0000 UTC"                                            
watchtower    | time="2024-09-17T15:53:55Z" level=info msg="Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"                
watchtower    | time="2024-09-17T15:53:55Z" level=warning msg="Trace level enabled: log will include sensitive information as credentials and tokens"       
watchtower    | time="2024-09-17T15:53:58Z" level=error msg="Failed to send shoutrrr notification" error="error enabling StartTLS: 421 4.7.0 Try again later, closing connection. (EHLO)\n4.7.0  For more information, go to\n4.7.0  https://support.google.com/a/answer/3221692 a640c23a62f3a-a9061099278sm14502366b.34 - gsmtp" index=0 notify=no service=smtp                                                                                                                    
watchtower    | time="2024-09-17T15:54:00Z" level=error msg="Failed to send shoutrrr notification" error="error enabling StartTLS: 421 4.7.0 Try again later, closing connection. (EHLO)\n4.7.0  For more information, go to\n4.7.0  https://support.google.com/a/answer/3221692 a640c23a62f3a-a90610f5d31sm14603366b.104 - gsmtp" index=0 notify=no service=smtp

Additional context

No response

github-actions[bot] commented 1 day ago

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏