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:
That first line works nicely; e.g. for a sudo password failure, you get a notification that looks like this:
However, that second one gets output that looks like this:
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 my-person-cron@ntfy.mydomain.com.
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.
:bulb: 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:That first line works nicely; e.g. for a sudo password failure, you get a notification that looks like this:
However, that second one gets output that looks like this:
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 my-person-cron@ntfy.mydomain.com.
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 likesmtpSession.Data
- extracting the subject, determining if it's HTML, managing attachments, etc.:computer: Target components - ntfy server