Re: Email script
Tim O'Brien wrote:
>
> I'm trying to get one of the Linux boxes I run to send me it's IP address
> by Email every time it logs onto the Internet (it has a *!@%* dynamic IP
> address). For some reason, the script doesn't work. It creates a file that
> contains the data it's supposed to (ipinfo.txt), but I never get the Email.
> However, typing
>
> mail -s IPINFO tjobrien@traveller.com < /etc/ppp/ipinfo.txt
>
> on the command line causes the mail to be sent.. I'm baffled. Any ideas
> what I did wrong? (A copy of the ip-up script follows)
> echo Peer IP Number: $5 >> /etc/ppp/ipinfo.txt
>
> mail -s IPINFO tjobrien@traveller.com < ipinfo.txt
Does it work if you put the full pathname in the maili statement like
you
do for the echo statements?
mail -s IPINFO tjobrien@traveller.com < /etc/ppp/ipinfo.txt
--
...RickM...
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: