Hi,

I’m looking for some way to send my own alerts via e-mail in some way. Whenever I try to search for this, most docker images have a much grander goal, and I have a hard time understanding how to use them for my purpose.

What would I want? It’d be nice to have a docker running some smpt-server (I suppose), so that I can make my own python script that scrapes a website, looks at some metric, and e-mails me whenever whatever I’m looking for is found. I only want it to be available on and to receive mails from localhost, no dns, just forward e-mails to my personal one, no web-interface, etc.

I’m quite new to self-hosting, but I hope you still understand what I’m looking for. Is it possible? Should I look for another solution? Will this not work? Any help/input very much welcome.

    • Illecors@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      This is the way, @mumblefish. I use mail from mailutils:

      mail "$recipient" \
                -r "$emailFrom" \
                -s "$emailSubject" \
                < "$filename"
      

      where $filename is a file containing the body content of the email.

  • MattMckenzy@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    For a second I thought I had made the perfect solution for this, but then I realized my problem was the opposite. I was looking for a way to receive notifications from systems that can only send emails. So I quickly made the Mail2Gotify service and have been using it for the past while.

    I’ll post it here anyway in case you want to switch from emails to Gotify in the future!

    https://github.com/MattMckenzy/Mail2Gotify