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

ntfy filtering for mail over http #1117

Open
lutzky opened this issue May 24, 2024 · 0 comments
Open

ntfy filtering for mail over http #1117

lutzky opened this issue May 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@lutzky
Copy link

lutzky commented May 24, 2024

💡 Idea

My home server (and workstation) occasionally send emails, e.g. on cron job failures. https://docs.ntfy.sh/examples/#cronjobs shows how to do this manually for cron jobs (and doesn't forward stdout). Another way of doing it is using cron's (or anacron's) built-in MAILTO component, and creating a .forward file with contents such as:

[email protected]
"| curl -H 'Authorization: Bearer tk_tokentokentoken' -H 'X-Tags: email' -d '@-' https://ntfy.mydomain.com/my-personal-cron"

That first line works nicely; e.g. for a sudo password failure, you get a notification that looks like this:

image

However, that second one gets output that looks like this:

image

Now, in my case, mydomain.com runs on CloudFlare, and it's fairly easy to expose HTTP that way, even when opening ports is impossible or undesirable. This doesn't work for email, so I can't send email to [email protected].

What would be really nice is if I could supply a header like X-Filter-this-as-though-it-is-email: true for cases like this. Essentially, this should act like smtpSession.Data - extracting the subject, determining if it's HTML, managing attachments, etc.

💻 Target components - ntfy server

@lutzky lutzky added the enhancement New feature or request label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant