This question may not belong here. But people here can help.

I backup files for clients. After it is done, I run a power shell script to email clients and myself that backup is completed. Problem is that I have to put an email login/password in that script in order to do that. Obviously, this is not a perfect solution.

I have been thinking about various ways, e.g. write an exe file and hard code password. problem is that what if I need to change password.

Any suggestions? Thanks,

  • Shadow
    link
    fedilink
    English
    28 months ago

    If you’re sending email to yourself and you use your own SMTP server as the outgoing, you don’t need auth.

    Drop the client off the emails to avoid relaying.

  • @xkcd__386B
    link
    fedilink
    English
    18 months ago

    if the message itself is not important/sensitive, or can be suitably obfuscated without loss, use ntfy.sh

    • pick a word. Let’s say you pick Quei3Oju
    • install ntfy.sh app on your phone, and subscribe to the channel Quei3Oju
    • send messages from the server using curl -d "Backup successful" ntfy.sh/Quei3Oju

    no passwords, no secrets. Risk: anyone who knows that word (or the operator of ntfy.sh) can see your messages. Hence why the point about sensitivity of the message itself

    Edit 1: this is literally the main example if you browse to ntfy.sh :)

    Edit 2: what a coincidence; I just saw this thread: https://old.reddit.com/r/selfhosted/comments/17ke5ax/ntfy_is_a_great_tool_what_do_you_use_it_for/ in the same sub!