mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
How to set a sane SMTP Helo #3116
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#3116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sebix on GitHub (Feb 10, 2024).
⚠️ Please verify that this question has NOT been raised before.
🛡️ Security Policy
📝 Describe your problem
For SMTP connections, the app uses the bogous HELO 127.0.0.1, not the hostname.
How can the SMTP Helo be set, or set to the hostname?
📝 Error Message(s) or Log
🐻 Uptime-Kuma Version
1.23.3
💻 Operating System and Arch
Debian 10 amd64
🌐 Browser
Firefox
🖥️ Deployment Environment
@CommanderStorm commented on GitHub (Feb 10, 2024):
When you are refering to
bogous HELOyou are refering to the smtp extention discovery mechanism.See https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#Extension_discovery_mechanism:
=> this is neither configurable, nor should it as far as I can tell.
=> I am going to close this as resolved. We can reopen if this is actually an issue and not just smtp working as intended ^^
As for this issue, please take the time to write proper issues (include the configuration, what you tried, where you got the log message from (this does not look like one produced by us), ...)
Remember that writing bad issues leads to you getting bad support
@sebix commented on GitHub (Feb 10, 2024):
In the SMTP standards the HELO/EHLO are used for sending the own hostname.
You can read that also on the page you have linked:
Btw, verifying the HELO name (e.g. comparing with reverse record) is part of anti-spam measures.
This is an excerpt of the SMTP connection. There were no entries in /app/data/error.log
@CommanderStorm commented on GitHub (Feb 10, 2024):
The
nameparameter should be set to the hostname of the machine by default according to nodemailerSee https://nodemailer.com/smtp/#connection-options
We currently don't set this parameter.
I currently don't have the time (exams) to propose a PR with the needed testing (attach screenshots) that this works.
If you want to change the current behaviour:
The primary base url (see settings, not guaranteed to be there) of the uptime kuma can be gotten via
await setting("primaryBaseURL").Our contribution guide is here: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md
The relevant configuration is here:
github.com/louislam/uptime-kuma@56aa81e337/server/notification-providers/smtp.js (L15-L22)@sebix commented on GitHub (Feb 10, 2024):
Thanks, I will have a look!
@apio-sys commented on GitHub (Feb 10, 2024):
Maybe I can help to clarify this "issue".
@sebix You are talking about outgoing connection to send email notifications right ? You are correct an email server should have proper hostname configuration, sending an appropriate HELO/EHLO corresponding to that hostname and having a PTR record that points it's IP to that host. Then you can start communicating with the rest of the world. However, I don't think it is within the scope of Uptime Kuma to act as an email server but just as a "client". Hence we use authenticated SMTP to have our (remote) SMTP server accepting the mail from us and forward it on where ever needed (he is the "mail server" not us on the app side). So the helo to there doesn't matter very much.
You could compare with your local Thunderbird or whatever mail client sending via same SMTP server to which you authenticate. If you have a local MTA - as I do - it is still the same really. You dump you local mail() command from whatever app, and up to your MTA or mail server to decide if you are auth to do that and then send on. Other discussion about that here #2793 .
In any case, and IMHO, you should not seek to have the node server behind UK to send email directly to the outside world but either relay via an authenticated SMTP of yours or your local MTA which should be configured to the outside world. This is not the role of an/any app.
Does this help clarify a bit?