TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I ...



For work, I setup a linux server which connects to the internet on demand
and has a dynamic ip address. When I send mail to a certain e-mail address
it is picked up by this computer when it is connected and forwarded back
to me. In the headers of the e-mail I get back there is the IP address for
the server.

The line is:

Received: from hearingsociety.org (root@sf-usr2-49-241.dialup.slip.net)  

I have procmail forward all messages to this address to a specific folder.
I would like to have procmail filter and then run a program which will
find the last entry of root@sf.X.slip.net and telnet to that IP with
username and password and have the connection pop onto my X display so
that I can then remotely administer to the computer. Right now I send the
e-mail and have to stay at my computer until I get the e-mail then quickly
get the IP and telnet before it disconnects. I know a little bash
scripting, and I haven't looked at procmail yet, but I don't know how to
separate the IP from the whole line nor how to output only the last entry
of it. (cat and sed?)

Thanks,

Ben



Ben Luey
lueyb@carleton.edu
ICQ: 19144397