[Novalug] Re: how do you send email with evolution through your home computer and ssh?

DonJr djr1952 at hotpop.com
Tue Dec 4 07:49:50 EST 2007


I recently had Nino ask me the following question of list.
By way of the above long subject line.

On Mon, 2007-11-26 at 21:41 -0500, Nino Pereira wrote:
> how do you send email with evolution through your home computer and
> ssh?


How I am doing it currently is:
  I have a DSL connection from home that I constantly keep active.

One of the feature that my "firewall/router" (currently it's IpCop)
system has is the ablity to register with a Dynamic DNS service so that
I can find my home system on the Internet when I away from home.
{The free service that I currently use is: <https://www.dyndns.com/> }

And I have my "firewall/router" forward a port (in the 200 range) to
port 22 on my desktop system.

Now for the next step you have Three(3) or more ways to do pull it off.
 {-: Each has there own advantages and/or disadvantages. :-}

 (If you normally have a FAST connection aviable while away and don't
need{want} offline reading.)
 First: (my current way)
  I run a VNC (Virtual Network Computing) server on my desktop to handle
the X (server). Note most current Linux X Desktop Environments support
VNC sharing, so running it as a "server" isn't a requirement.

 Anyway I start my desktop environment with a line something like:
   vnc4server -geometry 1200x708 -depth 16 -AlwaysShare=on ....

And I have a ~/.vnc/xstartup  like the following:
  #!/bin/bash
  # create a standard X session
  /etc/X11/Xsession
  # kill the Xvnc server
  /usr/bin/vnc4server -kill $DISPLAY
  # clean up Xauthority
  # get the display number itself
  dnum="${DISPLAY/*:/}"
  # get rid of the fraction
  dnum="${dnum/.*/}"
  # get the host name 
  host="$(uname -n)"
  # remove the keys for xauth
  xauth remove ${host}:${dnum} ${host}/unix:${dnum}
  exit 0

NOW for the client side of things:

Connect my portable to the Internet:
 Open an 'ssh' session in an Xtern window
  ssh -p 2?? 5901:127.0.0.1:5901 djrInternetHostname

 # 2?? is my private "ssh" port number that I mentioned above.
 # Using a non standard port puts a STOP to those damn script kiddies.
 # I never had one even try, even during the peak of the last outbreak.

 and then arrange to run "vncviewer" as:
  vncviewer 127.0.0.1:5901

(Note using "putty" and "vncviewer" for XP your portable can be running
XP and everything else would look basicly the same way.}

In the VNC X session I run Evolution and other programs just as if I was
setting at my Desktop, other then some minor slow updating at times.
 {-: I haven't as of yet figured out how to forward "sound" without
jumping through hoops and "local" printing takes a few extra steps.:-}

---- Another way is: ----
Connect portable to the Internet:
 Open an 'ssh' session in an Xtern window
   ssh -X -p 2?? djrInternetHostname
  #   /\ The X enables Xsession forwarding
  #      and you need a local X Display the handle the Display
  # {Linux based X systems work great.
  #  XP requires additional software and all the free stuff I've tried
  #  has been SLOW and/or broken.}

And from within the "ssh session" run:
   evolution

And use almost like running is as a local session.
 {-: Same hassels as above with sound and/or printing. :-}

----- The third way, which also allow offline reading: ----
# advantages are:
#  local reading of mail (even when offline)
# and
#  work fast over slow connections.

Have "SMTP(sendmail)" sever running on the system you ssh into.

And open an "ssh" or "putty" session like this:
  ssh -p 2?? 2025:127.0.0.1:25 Your.Public.Host.Name

Now configure your local Email Client to use:
  127.0.0.1:2025
as it's outgoing SMTP server address.

This way "forwards" your outgoing mail over an encrypted channel to your
home SMTP(sendmail) server. At most it adds an extra local "Received:"
header, but may not depending on the client you use.


In a later reply Nino suggested that the mailing list may find this
information useful. So here it was.

-- 
--
--
Don E. Groves, Jr.

$ mailstat
Most people don't type their own logfiles; but, what do I care?



More information about the Novalug mailing list