LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2001, 03:17 PM   #1
Sathe
Member
 
Registered: Sep 2001
Location: Bryan, Ohio USA (Home of the Etch-A Sketch)
Distribution: RedHat 7.1, 7.2, and 7.3
Posts: 76

Rep: Reputation: 15
Email Script


i need to create an email script that will send me an email everyday telling me what my IP address that day is, this way if i need to make changes from the outside world i can ssh into it.
 
Old 10-22-2001, 02:51 AM   #2
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Re: Email Script

Quote:
Originally posted by Sathe
i need to create an email script that will send me an email everyday telling me what my IP address that day is, this way if i need to make changes from the outside world i can ssh into it.
Try "cron"

Set the "MAILTO=" to the address that you want it sent to.

http://www.lysator.liu.se/~forsberg/linux/cron.html

As for your IP address, use the dhcpcd or dhclient program maybe? (I'm no net-nerd)


John
 
Old 10-22-2001, 04:33 AM   #3
dorward
Member
 
Registered: Sep 2001
Distribution: Gentoo
Posts: 760

Rep: Reputation: 31
I would run this with cron:

ifconfig | mutt you@you.com -s "ip address"

... actually I wouldn't. I'd get a static host name for my dynamic ip: http://directory.google.com/Top/Comp..._DNS_Services/
 
Old 10-22-2001, 07:34 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
i use ods.org, as it's free and comes with a linux executable to put in a dialup script, which will automatiicaly update your ip when you connect.

Mind you, having said that i've not manged to get it to work automatically, cos putting it in a ppp script means it runs before it's connected properly.. i guess i could do it as a cron, but that sucks. any better ideas?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to send email... bfloeagle Linux - General 5 10-13-2009 10:20 AM
Email Print Script lubinsmalley Linux - Newbie 2 10-03-2004 04:07 AM
Email headers in shell script anjaan Programming 3 07-07-2004 01:30 PM
Bsh Script ( Email ) joseph Linux - Networking 3 10-29-2003 10:36 PM
email me my IP script linuxRules Linux - General 1 11-12-2002 09:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration