LinHES Forums
http://forums.linhes.org/

Command line mailer recommendations?
http://forums.linhes.org/viewtopic.php?f=5&t=1617
Page 1 of 2

Author:  tzlaine [ Wed Jun 02, 2004 7:08 pm ]
Post subject:  Command line mailer recommendations?

I want to email myself my extremely-frequently-changing dynamic IP address of my at-home network so that I can log in to MythWeb from elsewhere (e.g. work).

I've written a script that figures out the IP address, and now I want to add a line to the script that will send me the address. I'm used to using pine at work and hotmail for personal stuff, and I tried using plain old "mail", but it doesn't seem to be installed under KnoppMyth and I couldn't find it under the ~1 million replies I got from "apt-cache search mail". So I'm at a loss as to what to use.

I have a regular SMTP/POP account from my ISP that I plan to use; can anyone suggest a simple command-line app for this?

Author:  cesman [ Wed Jun 02, 2004 8:12 pm ]
Post subject: 

It would probably be best to manually configure a static IP. Using a dynamic IP may mess things up if you every decide to add a frontend or a slave backend.

Author:  jesse [ Wed Jun 02, 2004 8:39 pm ]
Post subject: 

You can use PHP to send E-mail. It will run any command line application.

Author:  Dinki [ Wed Jun 02, 2004 9:18 pm ]
Post subject:  Re: Command line mailer recommendations?

tzlaine wrote:
I want to email myself my extremely-frequently-changing dynamic IP address of my at-home network so that I can log in to MythWeb from elsewhere (e.g. work).


Although this is not the question you're asking, but a different solution to your problem could be to sign up for a dynamic dns service (http://www.dynu.com is a free one).

You sign up, download a little app that runs on your box which updates your ip in their hosts file any time your ip changes. When you want to connect to your box, you then use your_account_name.dynu.com to get there.

I think it's a bit easier than what your trying to do. Just a thought.

Author:  davem [ Thu Jun 03, 2004 10:28 am ]
Post subject: 

I've got a perl script that sends out very basic mail by connecting to an smtp mail server. Shoot me a message through the forum if you'd like it.

Author:  tzlaine [ Thu Jun 03, 2004 12:01 pm ]
Post subject: 

cesman wrote:
It would probably be best to manually configure a static IP. Using a dynamic IP may mess things up if you every decide to add a frontend or a slave backend.


I'm referring to the dynamic IP address provided by my ISP, over which I have no control. Within my NATted network, I do have a static IP for my KnoppMyth box.

@Davem:
That would be dandy. Send it on!

@Dinki:
I didn't know any of those were free. I'll check it out; thanks.

Author:  khrusher [ Thu Jun 03, 2004 12:03 pm ]
Post subject: 

And yet another solution....

I have a static address on my myth box but its behind a NAT router. The WAN IP address from my ISP is dynamic. To determine the external IP address of the router I make a call to http://checkip.dyndns.org/

I parse the data from wget http://checkip.dyndns.org/ to determin the IP address. I then generate an HTML file (myth.html) with a URL that points to the current IP address. This HTML file is ftp'ed to a server with a static IP address (i.e. pesonal web space some where..I have www.chrismenard.com).

This runs via cron.

So I can go to http://www.chrismenard.com/myth.html. This page always has an up-to-date link to my myth box.

I can share the script (which you may need to adjust) if anyone wants it.

Author:  tzlaine [ Thu Jun 03, 2004 12:14 pm ]
Post subject: 

khrusher wrote:
And yet another solution....

I have a static address on my myth box but its behind a NAT router. The WAN IP address from my ISP is dynamic. To determine the external IP address of the router I make a call to http://checkip.dyndns.org/

I parse the data from wget http://checkip.dyndns.org/ to determin the IP address. I then generate an HTML file (myth.html) with a URL that points to the current IP address. This HTML file is ftp'ed to a server with a static IP address (i.e. pesonal web space some where..I have www.chrismenard.com).

This runs via cron.

So I can go to http://www.chrismenard.com/myth.html. This page always has an up-to-date link to my myth box.

I can share the script (which you may need to adjust) if anyone wants it.

This is the page that is generated...http://www.chrismenard.com/myth.html


This is a far better solution than emailing my address to myself. If things don't work out with dynu.com, I'll definitely do this.

Author:  khrusher [ Thu Jun 03, 2004 12:47 pm ]
Post subject: 

does http://www.dynu.com (or its 'application') report the IP address of the box or the IP address that is needed to access from the internet.

These are different for me

Back to the orignal question. is there a command line mailer I can use for other purposes....Im familar with mailx but apt-get install mailx yields

Code:
The following packages have unmet dependencies:
  mailx: Depends: exim4 but it is not going to be installed or
                  mail-transport-agent

Author:  Dinki [ Thu Jun 03, 2004 1:32 pm ]
Post subject: 

khrusher wrote:
does http://www.dynu.com (or its 'application') report the IP address of the box or the IP address that is needed to access from the internet.


You can have it ignore the local ip and report the ip of your cable modem/dsl/dial up

Author:  khrusher [ Wed Jul 21, 2004 12:26 pm ]
Post subject: 

ok...so all of the silence implies no one sends email from their myth boxes....

BTW, what is 'boxen'

Author:  Xsecrets [ Wed Jul 21, 2004 12:51 pm ]
Post subject: 

boxen is commonly used as a plural of box, most likely a created since oxen is the plural of ox.

Author:  saruman [ Thu Jul 22, 2004 12:19 pm ]
Post subject: 

Here are some answers:

- MythTV box accessible remotely
- Create an account with somebody like dyndns.org (or some of the other, as mentioned in previous replies)
- Install a client on your box that will update the record on a regular basis. I use "ddclient" (it's in Perl). It works pretty well, and is smart in that it only refreshes the entries if the IP adress has changed (some providers will lock up if you refresh your entry say, every minute...)
- At this point, you will be able to point to the WAN side of your DSL/Cable connection by using an address such as "mymythtvbox.dyndns.org".
- If you have a router/switch (most likely, since you probably have several boxes on your LAN), you need to:
1) open a port on the router/switch for incoming traffic (I would recommend only opening something like "2223" for inbound ssh traffic)
2) forward traffic coming to port "2223" on the WAN side onto your Mythtv box on the LAN side. It is useful to use a static address on your LAN, and not DHCP (although DHCP leases typically should stay stable)
The method to implement these two things depends on your router/switch. Most likely, you have a web interface to set this up. Check your manual.

- If you want to have access to the Web server on your Myth box, I would suggest:
- Enabling https on the web server
- Password protecting the directories
- Forwarding port 443 (if I remember well) as above

If a few people are interested in more detailed instructions, shout, and I will post, but it won't be before August. I am currently abroad, and ... my Myth box is down/inaccessible.

Laurent

Author:  saruman [ Thu Jul 22, 2004 12:21 pm ]
Post subject: 

Oh, and to send email, I have a small Perl script that functions like the standard "mail", but uses a remote SMTP server. Pretty handy. I can post also, once I get back to my box.

Author:  Dinki [ Thu Jul 22, 2004 1:30 pm ]
Post subject: 

saruman wrote:
I can post also, once I get back to my box.


Can't you just ssh in now?? :D Just kidding.. Couldn't resist!

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/