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

[SMTP] Allow unsecured mailservers #645

Closed
sharknoon opened this issue Mar 2, 2023 · 4 comments
Closed

[SMTP] Allow unsecured mailservers #645

sharknoon opened this issue Mar 2, 2023 · 4 comments
Labels
enhancement New feature or request server Relates to the main binary (server or client)

Comments

@sharknoon
Copy link

Hello,

I have ntfy deployed in a containerized environment with docker. There I have an external mailserver (SMTP) that is only accessible via a docker network. My mailserver has no authentification, because it is not public. Only containers in the same network can access it.

When I leave the field smtp-sender-user / smtp-sender-pass blank, the error is the following:

Mismatched type for flag 'smtp-sender-user'. Expected 'string' but actual is ''

When I comment it out, the error is the following:

if smtp-sender-addr is set, base-url, smtp-sender-user, smtp-sender-pass and smtp-sender-from must also be set

This error comes from here.

I would be very happy, if we would allow mailservers without auth. Especially for cases, where the mailserver is exclusive to ntfy by being bundled in the same docker-compose network.

Btw Thank you @binwiederhier for making such a great app and putting so much effort in it, I am loving ntfy :)

Kind regards from the southwest of germany (Stuttgart)

Sharknoon

@binwiederhier binwiederhier added enhancement New feature or request server Relates to the main binary (server or client) labels Mar 3, 2023
@binwiederhier
Copy link
Owner

I implemented this in 90db128

Sadly I do not have an SMTP server without to test this with, but I'm pretty sure it'll work. If you know how to build ntfy, you can build the latest main branch. If not, I built an amd64 version for you here:

curl https://ntfy.sh/file/gEmVMKDSMFTI.bin > ntfy-snap
chmod +x ntfy-snap
./ntfy-snap

@binwiederhier
Copy link
Owner

I'm closing this ticket since I assume it works, If it doesn't, please let me know.

@sharknoon
Copy link
Author

Thank you so much for your very fast implementation. I was already working on a pull request, made the same changes, but you were faster :) Thanks!

@binwiederhier
Copy link
Owner

I'm sorry I took that from you. It just felt so easy, and I sometimes like doing easy things inbetween all the weird and complicated stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server Relates to the main binary (server or client)
Projects
None yet
Development

No branches or pull requests

2 participants