Maintaining SSH connections *or* elegant management of multiple SMTP

civitan at jeffporten.com civitan at jeffporten.com
Fri Apr 2 20:56:59 PST 2004


I imagine most of you are in a similar situation to me.  On any given 
day, I might be on 6 different networks:

1) my home ISP
2) my commercial hotspot network
3) my GPRS phone
4) a client site network
5) my dialup
6) a random open hotspot

So I find myself switching SMTP servers on a regular basis.  Have an 
AppleScript to manage this in Mail.app, which I'll be publishing 
shortly on my website.

But it's still a pain in the patootie.  My hotspot SMTP is on several 
blacklists, and I'll be darned if I'm sending email from public 
hotspots in the clear.  So I use the following command to ssh tunnel to 
my home connection when I'm roaming about:

sudo ssh -L 25:smtp.myisp.net:25 me at mydomain.dyndns.org

which works rather nicely.  But then, for whatever reason, these 
tunnels just, er, collapse -- no communication.  Which means I have to 
kill the previous ssh process and reestablish the tunnel.  This occurs 
5 times a day.

So, question 1: how do I tell these ssh connections to stay open?  I 
found a Keep Alive setting, and I have it turned on on both sides, but 
no dice.

Question 2: anyone got a better solution than this?  I've got an SMTP 
server I'm carrying around on my PowerBook, and I'm thinking of setting 
that as my one-and-only SMTP, but I don't know how to connect that to 
the outside world.  All of these networks block SMTP, for obvious 
reasons -- and when it does get through, since the PBook isn't on a 
reverse-DNS lookup, that mail can get spamblocked.

Okay, now to set my SMTP to GPRS so I can mail this puppy....

Best,
Jeff Porten



More information about the X-Unix mailing list