[Uaflug] Need 'mail' help.

Paul Swanson themadcellist at gmail.com
Thu Apr 12 03:54:55 AKDT 2007


I'm running Ubuntu Feisty, and I can't send myself an email using
'mail' (I installed mailutils).

mail -s "Subject" email at address.com
Body text blah
[ctrl+d]

Correct? Well, it's not working.

In a more generic sense, I just need to get a tiny bit of information
off of a remote computer every now and then. If there's some other way
to get it to me, that'd work as well.

What I'm ultimately trying to do is get the IP address of my mom's
computer. It changes every few days, and I need to SSH into it. What
I'm thinking right now is - Run a cron job that twice a day runs this
script:

rm index.html
wget whatismyip.com
egrep -m 1 -o '([0-9]{1,3}\.){3}[0-9]{1,3}' index.html > temp.txt
if [ "`cat momsip.txt`" != "`cat temp.txt`" ]; then
        mv temp.txt momsip.txt
        mail -s "Mom's IP address" -t my at email.com
        # ???
fi

I suppose I could also have it scp the file into my modzer0 account,
but this seems more elegant. Also, would it need the password every
time?

Or is there a much more elegant solution?

Thanks,
Paul


More information about the uaflug mailing list