write a shell script to send email
hi,
i have a dailed-up machine (FC2) serving as Internet gw and Web proxying, remotely operated at another town. through, firewall setting, i have configured in such a way that, the machine only accept ssh from my own static ip gateway. but, the trouble is that, everytime the machine reboots. network service is restarting, firewall rule is loading, then, i have to call them and ask the office boy to get me the new dailed ip. pretty stupid, huh?. can i have a script, once the ip (internet gw ip, i mean) is changed, then, it will straight email to my account?? could it be possible??? give me a pointer to look into it. thanks... Cheers, yenonn |
Try http://www.no-ip.com/ or http://www.dyndns.org/ . I believe they have the right service for you
|
sending email is easy from the command line/shell script
try: |
do i need to set the default smtp server?? thanks
|
ifconfig ppp0 | mail -s "IP information" user@host.com
The need for an SMTP server is dependant on *many* things. To be correct, you'd be best off setting the local MTA to forward all email (for which it's not the final destination) through your ISP's SMTP gateway unless you have control over your reverse DNS, yadda yadda yadda ... |
All times are GMT -5. The time now is 01:20 PM. |