Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to send notification email: unencrypted connection #492

Closed
opelx opened this issue Apr 3, 2020 · 5 comments
Closed

Failed to send notification email: unencrypted connection #492

opelx opened this issue Apr 3, 2020 · 5 comments

Comments

@opelx
Copy link

opelx commented Apr 3, 2020

Describe the bug

Using the notification type email, on unencrypted (private) network sending mail fails, even with NOTLS. The error is:

Failed to send notification email: unencrypted connection

To Reproduce
Steps to reproduce the behavior:

use docker-compose.yml
--------------------8<-----------------------
version: '3'
services:
watchtower:
image:
containrrr/watchtower
restart: always
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
command:
--cleanup
environment:
- TZ='Europe/Berlin'
- WATCHTOWER_NOTIFICATIONS=email
- WATCHTOWER_NOTIFICATION_EMAIL_FROM=watchtower@example.com
- WATCHTOWER_NOTIFICATION_EMAIL_TO=admin@example.com
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER=mail.example.com
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_TLS_SKIP_VERIFY
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=watchtower@example.com
- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=watchtower
- WATCHTOWER_NOTIFICATION_EMAIL_DELAY=3
-------------------->8----------------------
$ sudo docker-compose up -d

Expected behavior
Sending an email :)

Environment

  • Platform
    clear linux

  • Architecture
    i86/x64

  • Docker version
    $ docker --version
    Docker version 19.03.6, build 369ce74a3ce86a392e39e45d3960ce970fdfac97
    $ docker-compose --version
    docker-compose version 1.24.1, build unknown

Logs from running watchtower with the --debug option

time="2020-04-03T15:25:28Z" level=info msg="Starting Watchtower and scheduling first run: 2020-04-03 15:30:28 +0000 UTC m=+300.461220288"
Failed to send notification email: unencrypted connection

Additional context
Add any other context about the problem here.

The setup is part of a private "Home Lab" without SSL connections yet, which isn't required at this time. Testing mail transfer works, I'm using mailu.io for this.

@github-actions
Copy link

github-actions bot commented Apr 3, 2020

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! 🙏

@piksel
Copy link
Member

piksel commented Apr 3, 2020

This is unfortunatly not supported by the go smtp library:
https://godoc.org/net/smtp#PlainAuth

@opelx
Copy link
Author

opelx commented Apr 3, 2020

This is unfortunatly not supported by the go smtp library:
https://godoc.org/net/smtp#PlainAuth

Ok, so far I understand (or even not), What is the purpose of WATCHTOWER_NOTIFICATION_EMAIL_SERVER_TLS_SKIP_VERIFY in this context?

@piksel
Copy link
Member

piksel commented Apr 3, 2020

Skipping the certificate verification, meaning you can use a self-signed cert

@opelx
Copy link
Author

opelx commented Apr 4, 2020

Ok, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants