unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* IMAP over SSH in GNUS
@ 2008-02-14 12:51 Hans Ekbrand
  2008-02-14 21:27 ` Reiner Steib
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Ekbrand @ 2008-02-14 12:51 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]

Dear list!

I want to try out gnus for reading email. Currently, I use mutt with IMAP over ssh like this:

set tunnel="ssh -q code.cjb.net 'export MAIL=maildir:$HOME/Maildir; /usr/lib/dovecot/imap --exec-mail imap'"

After reading the documentation of gnus, I tried the following:

(setq gnus-select-method '(nntp "textnews.news.cambrium.nl"))
(setq gnus-secondary-select-methods
 	'(
		(nnimap "code.cjb.net"
        	        (nnimap-stream shell)
		 	(imap-shell-program "ssh -q code.cjb.net 'export MAIL=maildir:$HOME/Maildir; /usr/lib/dovecot/imap --exec-mail imap'")
		 )
                (nnimap "test"
                     (nnimap-address "localhost")
                     (nnimap-server-port 1234)
		 )
	)
)

While the second entry "test", works it requires:

 a. a working ssh-tunnel before I start gnus
 b. that the imap server is configured to listen on a port and to authenticate
 c. that gnus manages (asks me about) username and password for the imap server

All of which are unnecessary in my current setup (the mutt-onliner above).

Why does not the first entry above "code.cjb.net" work? (gnus says:
     {nnimap:test} (opened)
     {nnimap:code.cjb.net} (denied))

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: IMAP over SSH in GNUS
  2008-02-14 12:51 IMAP over SSH in GNUS Hans Ekbrand
@ 2008-02-14 21:27 ` Reiner Steib
  0 siblings, 0 replies; 3+ messages in thread
From: Reiner Steib @ 2008-02-14 21:27 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, Feb 14 2008, Hans Ekbrand wrote:

> (setq gnus-secondary-select-methods
>  	'(
> 		(nnimap "code.cjb.net"
>         	        (nnimap-stream shell)
> 		 	(imap-shell-program "ssh -q code.cjb.net 'export MAIL=maildir:$HOME/Maildir; /usr/lib/dovecot/imap --exec-mail imap'")
> 		 )
>                 (nnimap "test"
>                      (nnimap-address "localhost")
>                      (nnimap-server-port 1234)
> 		 )
> 	)
> )
>
> While the second entry "test", works it requires:
>
>  a. a working ssh-tunnel before I start gnus
>  b. that the imap server is configured to listen on a port and to authenticate
>  c. that gnus manages (asks me about) username and password for the imap server

See ~/.authinfo in (info "(gnus)NNTP").

> All of which are unnecessary in my current setup (the mutt-onliner above).
>
> Why does not the first entry above "code.cjb.net" work? (gnus says:
>      {nnimap:test} (opened)
>      {nnimap:code.cjb.net} (denied))

Hm, I never tried something like this.  Does it help to redirect
stderr to /dev/null as suggested in the manual?

,----[ (info "(gnus)IMAP") ]
|      For IMAP connections using the `shell' stream, the variable
|      `imap-shell-program' specify what program to call.  Make sure
|      nothing is interfering with the output of the program, e.g., don't
|      forget to redirect the error output to the void.
`----

If you don't get help here, you may ask in gnu.emacs.gnus.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: IMAP over SSH in GNUS
       [not found] <mailman.7402.1202997113.18990.help-gnu-emacs@gnu.org>
@ 2008-02-19 21:20 ` Ted Zlatanov
  0 siblings, 0 replies; 3+ messages in thread
From: Ted Zlatanov @ 2008-02-19 21:20 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, 14 Feb 2008 13:51:16 +0100 Hans Ekbrand <hans.ekbrand@sociology.gu.se> wrote: 

HE> I want to try out gnus for reading email. Currently, I use mutt with IMAP over ssh like this:

HE> set tunnel="ssh -q code.cjb.net 'export MAIL=maildir:$HOME/Maildir; /usr/lib/dovecot/imap --exec-mail imap'"

HE> After reading the documentation of gnus, I tried the following:

HE> (setq gnus-select-method '(nntp "textnews.news.cambrium.nl"))
HE> (setq gnus-secondary-select-methods
HE>  	'(
HE> 		(nnimap "code.cjb.net"
HE>         	        (nnimap-stream shell)
HE> 		 	(imap-shell-program "ssh -q code.cjb.net 'export MAIL=maildir:$HOME/Maildir; /usr/lib/dovecot/imap --exec-mail imap'")
HE> 		 )
HE>                 (nnimap "test"
HE>                      (nnimap-address "localhost")
HE>                      (nnimap-server-port 1234)
HE> 		 )
HE> 	)
HE> )

HE> While the second entry "test", works it requires:

HE>  a. a working ssh-tunnel before I start gnus
HE>  b. that the imap server is configured to listen on a port and to authenticate
HE>  c. that gnus manages (asks me about) username and password for the imap server

HE> All of which are unnecessary in my current setup (the mutt-onliner above).

HE> Why does not the first entry above "code.cjb.net" work? (gnus says:
HE>      {nnimap:test} (opened)
HE>      {nnimap:code.cjb.net} (denied))

Try a standalone shell script to set up the tunnel.  When that works,
you can just call it from Gnus.  I never had luck with opening SSH
directly.  Here's what I used to use:

#!/bin/sh

ssh -x z@x.y.com /home/lifelogs/bin/imapd | tee /tmp/imap-run

The tee was so I could see what happened on the server side.  I needed
this because Courier IMAP was not supported at the hosting company I had
back then :)

Ted


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-19 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-14 12:51 IMAP over SSH in GNUS Hans Ekbrand
2008-02-14 21:27 ` Reiner Steib
     [not found] <mailman.7402.1202997113.18990.help-gnu-emacs@gnu.org>
2008-02-19 21:20 ` Ted Zlatanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).