mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[PR #1164] [MERGED] Support SMTP Auth Plain for event publishing #1528
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#1528
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?
📋 Pull Request Information
Original PR: https://github.com/binwiederhier/ntfy/pull/1164
Author: @bishtawi
Created: 8/8/2024
Status: ✅ Merged
Merged: 9/29/2024
Merged by: @binwiederhier
Base:
main← Head:bishtawi/smtp-auth📝 Commits (1)
112efaaSupport SMTP Auth Plain📊 Changes
2 files changed (+38 additions, -6 deletions)
View changed files
📝
server/smtp_server.go(+16 -6)📝
server/smtp_server_test.go(+22 -0)📄 Description
Hi, very cool project. I am currently looking into hosting the server and I need to authenticate the services that are publishing
notificationsemails. I read the docs and saw that you can include an access token as part of the email (ntfy-$topic+$token@ntfy.sh) but unfortunately that solution does not work for my usecase. Access tokens are sensitive information and with my set up, email addresses are not. Including access tokens as part of the email address is not a feasible solution.SMTP has authentication protocols and a common one is AUTH PLAIN which your SMTP dependency (go-smtp) supports. We can hook up the SMTP AUTH PLAIN command to forward the credentials to the ntfy server and authenticate using basic auth.
I was honestly surprised at how easy it was to implement this, but I believe these are all the changes necessary. Let me know if there is anything else required.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.