Support SMTP Auth Plain for event publishing #1164
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ([email protected]
) 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.