Re: [OT] Remote SSH (dynamic IP) without third-party server
On Mon, Aug 10, 2020 at 11:18:10PM -0500, David Wright wrote:
> $ cat /etc/cron.daily/send-hotmail
> #!/bin/sh
> [ -x /root/.cron/send-hotmail.sh ] || exit 0
> /root/.cron/send-hotmail.sh
> $ cat /root/.cron/send-hotmail.sh
> #!/bin/sh
> mailx -s 'ZZZ---ZZZ' myfreeaccount@hotmail.co.uk < /etc/mailname
> $
Why have two one-liner scripts? Why not just put the mailx command
in the send-hotmail script directly?
> … sends my home's IP address each day to a location I can read from
> anywhere.
Who populates the /etc/mailname file, and how?
Is the IP address actually in the /etc/mailname file, or are you
parsing it out of the Received: headers and ignoring the body?
Reply to: