Command-lineMail Client?
Hello all,
I am looking for a good command-line mail client that I can use from
a shell script. Here's what I'm trying to do:
I have an FTP server and an SSH server set up on my Linux box at home.
I use a dial-up PPP connection to connect to the internet. I want to
be able to log into my computer from school (I attend college about 20
mins away from my house). I have pppd set up to redial my ISP if it
gets disconnected. The problem, as you may have guessed, is my IP
address will change. What I want to do is set up a little script that
can dial my ISP, figure out my IP, and email it to my school email
account. Then I can check my email from school, see what my IP is, and
log into my Linux box. I have the first two parts working fine (the
dialup and figuring out my IP). I cannot figure out how to send the
email. I tried to use the built-in "mail" command, but it did not
work. For some odd reason, it won't send mail to an external host. It
will only mail to local user accounts on my machine. I have a firewall
set up that will allow me to log in to my computer (either via FTP or
SSH) from a certain domain, and it will block all others. I need a
command-line email client that I can use in shell scripts, so that I
can completely automate the process. I could even set up a cron job
that dials my ISP and mails my IP every day at a certain time. If
anyone has any suggestions for a good mail client could you help me
out? I know this sounds like a really funky setup, but I can't afford a
static IP address and it would be really nifty if I could log into my
machine from school. I have no major need to log in, but it's a good
learning experience for me and it's fun to play around with this stuff.
Thanks in advance.
Casey
Reply to: