Subject: Re: feature request: choose smtp server

From: Cliff Green <[email-masked]>
Date: Wed, 2 Jan 2002 22:42:28 -0500 (EST)

On Mon, 31 Dec 2001, Nancy McGough wrote:

NM> On 27 Dec 2001 Joel Boonstra ([email-masked]) wrote:
NM> > I have a laptop that I bring to and from the office with me.  It uses RH
NM> > 7.1, with Pine 4.43, patched with Eduardo's excellent fancy thread patch.
NM>
NM> Here are 3 possible solutions.
NM>
NM> 1] In your pinerc, set
NM>
NM> smtp-server=localhost
NM>
NM> and then set up ssh port forwarding to forward your machine's
NM> port 25 to your work machine's SMTP server. This should then work
NM> whether you are at home or work because the requests to your work
NM> SMTP server will appear to be local.
NM>
NM> I've done this with PC-Pine and SecureCRT port forwarding but
NM> I've never done it from a Linux box. If anyone has successfully
NM> done this on *nix, I'd appreciate info so I can 1) try it and 2)
NM> add info about it in my Using Port Forwarding with Pine, which is
NM> here
NM>
NM>  <http://www.ii.com/internet/messaging/pine/pc/#ssh>

For this, ssh needs to be run by root - ports 25 and 143 (if you're also
forwarding imap) are privileged ports.

I've used:

"ssh -l <myaccount> -L 25:my.mail.host:25 -L 143:my.mail.host:143 my.host.name"

(that's one line - watch for linewrap)

Again, this is run by root (it *is* your own linux box, right?), but the
'-l accountname' can be an ordinary user on the remote host.

c
-- 
Clifford Green               Internet -  [email-masked]
Academic Computing Services                    UMDNJ-IST

---

From: Gopi Sundaram <[email-masked]>
Date: Wed, 2 Jan 2002 22:54:15 -0500 (EST)

On Wed, 2 Jan 2002, Cliff Green wrote:

> For this, ssh needs to be run by root - ports 25 and 143 (if you're
> also forwarding imap) are privileged ports.

They are privileged ports (as is anything less than 1024), but you don't
have to bind to those ports. You can forward to other ports like 1043,
1025 etc. and then add the port number to the server specification, eg:

    smtp-server=localhost:2250/user=xyzzy

Très simple, no?

-- 
Gopi Sundaram
[email-masked]
http://www.cse.sc.edu/~gopalan/Pine/

---

From: Cliff Green <[email-masked]>
Date: Thu, 3 Jan 2002 01:48:21 -0500 (EST)

On Wed, 2 Jan 2002, Gopi Sundaram wrote:

GS> On Wed, 2 Jan 2002, Cliff Green wrote:
GS>
GS> > NM>  <http://www.ii.com/internet/messaging/pine/pc/#ssh>
GS> >
GS> > For this, ssh needs to be run by root - ports 25 and 143 (if you're
GS> > also forwarding imap) are privileged ports.
GS>
GS> They are privileged ports (as is anything less than 1024), but you don't
GS> have to bind to those ports. You can forward to other ports like 1043,
GS> 1025 etc. and then add the port number to the server specification, eg:
GS>
GS>     smtp-server=localhost:2250/user=xyzzy

Yeah, I guess you could take that route.  I just prefer making ssh do the
work and let it be transparent to the client(s).  YMMV.

c