Subject: IMAP INBOX access

From: Simon Epsteyn <[email-masked]>
Date: Thu, 6 Dec 2001 13:33:20 -0600 (CST)

This seems like a silly question to ask, but I can't figure this out (and 
can't find any documentation on this)

How does one access remote IMAP INBOX (/var/spool/mail/<user>)? I can access
remote "collection" (home dir) just fine.

This is using pine 4.33 (Red Hat Linux 7.1)

Thanks,

/Simon

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Simon Epsteyn <[email-masked]>
Date: Thu, 6 Dec 2001 13:41:45 -0600 (CST)

On Thu, 6 Dec 2001, Simon Epsteyn wrote:

SE> This seems like a silly question to ask, but I can't figure this out (and 
SE> can't find any documentation on this)
SE> 
SE> How does one access remote IMAP INBOX (/var/spool/mail/<user>)? I can access
SE> remote "collection" (home dir) just fine.
SE> 
SE> This is using pine 4.33 (Red Hat Linux 7.1)

Ok, never mind that, I figured this out a second after sending this ;)

This is done via "incoming-folders= nick {host}INBOX", not via 
"folder-collections="

I did not see any way to configure this other then edit .pinerc

/Simon

---

From: bill hunter <[email-masked]>
Date: Thu, 6 Dec 2001 13:13:47 -0700 (MST)

>From main menu, select "l" for folders, you should be on
"Incoming-Folders", hit enter, then "a" to add, you will be prompted from
there.

What I want to know, is how can I do this to access a remote inbox via
ssh? I am behind a firewall, and the only outbound access I have is
through ssh.

ssh is setup and configured correctly, works interactively just fine. i am
running 4.40 on Solaris if it matters, and have set:

incoming-folders=other-inbox {remote-server.com/user=bill}inbox
rsh-path=/usr/local/bin/ssh
rsh-command=%s /usr/local/bin/ssh %s remote-server.com %s bill %s imap
ssh-path=/usr/local/bin/ssh
ssh-command=%s /usr/local/bin/ssh %s remote-server.com %s bill %s imap

i get an error saying the remote server does not exist...

help or pointers?

thanks,

bill

---

From: Simon Epsteyn <[email-masked]>
Date: Thu, 6 Dec 2001 14:25:10 -0600 (CST)

On Thu, 6 Dec 2001, bill hunter wrote:

bh> >From main menu, select "l" for folders, you should be on
bh> "Incoming-Folders", hit enter, then "a" to add, you will be prompted from
bh> there.

Yeah, thanks, I found that... A bit inconsistent from the rest of the setup 
(via Main Menu, Setup)

bh> What I want to know, is how can I do this to access a remote inbox via
bh> ssh? I am behind a firewall, and the only outbound access I have is
bh> through ssh.

Not sure how to do this via pine, but you can always tunnel ports via SSH, 
for example here's a guide I found via Google:

	http://csociety.ecn.purdue.edu/~sigos/projects/ssh/forwarding/

Look on the bottom: 'Secure port forwarding with "ssh -L"'

	You can forward arbitrary connections through your ssh tunnel using
	the -L option. This makes your ssh client listen on a given port and
	forward traffic received there through the tunnel; it instructs the
	remote sshd to send the traffic to a given IP address and port.

	1011 (sergent@hill-b-118:~) ssh -L 4242:shay:23 shay
	1001 (sergent@shay:~)
	*switch window*
	1007 (sergent@hill-b-118:~) telnet localhost 4242
	Trying 127.0.0.1...
	Connected to localhost.
	Escape character is '^]'.

	UNIX(r) System V Release 4.0 (shay.ecn.purdue.edu)
	
	login:

/Simon

---

From: Richard Stevenson <[email-masked]>
Date: Fri, 7 Dec 2001 11:10:50 +1300 (NZDT)

> ssh-command=%s /usr/local/bin/ssh %s remote-server.com %s bill %s imap

You don't need to specify the remote server or the actual path to the ssh
binary in ssh-command - Pine passes them to the exec() call.  I use this
(using OpenSSH 3.0.1p1, IIRC):

ssh-open-timeout=30
ssh-path=/usr/bin/ssh
ssh-command=%s %s -1 -C -i /home/richard/.ssh/imap-key -l %s exec /etc/r%sd

Note that said imap-key is an RSA key with no passphrase, and on the
remote end is set up so that the key can't be used to get a shell or run
anything other than "exec /etc/rimapd" (which may or may not exist on your
system - you'll need to check the documentation for your IMAP daemon to
see if you can make it do this).  I should probably use a key that has a
passphrase, but I'm lazy...  The comments above the ssh-command line in
the .pinerc documents this stuff pretty well.

You should probably also add the /Secure flag to your mailbox spec:

incoming-folders=other-inbox {remote-server.com/Secure/user=bill}inbox

Cheers

Richard

-- 
Richard Stevenson, Systems Specialist, Xtra Limited
Phone: +64 9 355 5231   Mobile: +64 25 290 3101   Pager: +64 26 100 155

  One of my local bookshops still has all the MCSE course materials filed
  under "IDIOTS"...
   -- Chris King, in the Monastery