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

Gmail Relay-Smtp needs name: mydomain.com transport settings #4790

Open
1 task done
odyodyodys opened this issue May 23, 2024 · 3 comments
Open
1 task done

Gmail Relay-Smtp needs name: mydomain.com transport settings #4790

odyodyodys opened this issue May 23, 2024 · 3 comments
Labels
area:notifications Everything related to notifications feature-request Request for new features to be added type:enhance-existing feature wants to enhance existing monitor

Comments

@odyodyodys
Copy link

πŸ“‘ I have found these related issues/pull requests

No related issues in uptime-kuma

πŸ›‘οΈ Security Policy

Description

Google supports a relay service for smtp.
The only change is to use smtp-relay.gmail.com as a host instead of smtp.gmail.com.

In uptime-kuma this usually fails with the error
421-4.7.0 Try again later, closing connection. (EHLO)

I traced that to be an issue with nodemailer.
Its authors seems to have reasons to hate google's smtp

The solution seems to be to include name: mydomain.com when creating the nodemailer transport

A generic solution to this is to allow advanced smtp configuration and add all the fields that nodemailer transport supports. This will greatly improve support for SMTP.

πŸ‘Ÿ Reproduction steps

Set smtp-relay.gmail.com as the smtp host and use app-passwords for the authentication in google workspace. I am part of a google workspace, no idea if this works for single gmail accounts.

πŸ‘€ Expected behavior

Send mails

πŸ˜“ Actual Behavior

Error:
421-4.7.0 For more information, go to https://support.google.com/a/answer/3221692 - gsmtp: 421-4.7.0 Try again later, closing connection. (EHLO)

🐻 Uptime-Kuma Version

1.23.11

πŸ’» Operating System and Arch

debian (official docker image)

🌐 Browser

Firefox 126.0

πŸ–₯️ Deployment Environment

  • Runtime: Docker 24.0.5 (API: 1.43)
  • Database: embedded
  • Filesystem used to store the database on: embedded
  • number of monitors: 80

πŸ“ Relevant log output

No response

@CommanderStorm
Copy link
Collaborator

Please refer to #4473 (comment)
I have not found the time to do the nessesary testing.
=> if you have the time for this...

I don't think that we need to allow users to configure name, as there are alredy way to many settings in said notification provider to make sense of.
=> defering to the primary base url for the hostname (if configured) seems like a good choice

@CommanderStorm CommanderStorm added feature-request Request for new features to be added area:notifications Everything related to notifications type:enhance-existing feature wants to enhance existing monitor and removed bug Something isn't working labels May 23, 2024
@CommanderStorm CommanderStorm changed the title Gmail Relay-Smtp service usually fails Gmail Relay-Smtp needs name: mydomain.com transport settings May 23, 2024
@odyodyodys
Copy link
Author

I agree that we need to keep it simple, though if we set it automatically we are only handling cases where uptime-kuma is public, which I guess is rarely the case.
It is usually configured behind a cloudflare tunnel or in a private network. In both cases name should not be the host as in the comment you are mentioning.
In my scenario the service is hosted on a private network.

How do you think we can handle those cases?

@CommanderStorm
Copy link
Collaborator

What do you mean?
The publicBaseUrl is the proper, outwards facing hostname you are getting uptime Kuma from...

It is set in the settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:notifications Everything related to notifications feature-request Request for new features to be added type:enhance-existing feature wants to enhance existing monitor
Projects
None yet
Development

No branches or pull requests

2 participants