Gnus development mailing list
 help / color / mirror / Atom feed
* Problems running IMAP over ssh port forwarding
@ 2017-02-27  9:23 Steinar Bang
  2017-02-27 21:50 ` Malcolm Purvis
  0 siblings, 1 reply; 3+ messages in thread
From: Steinar Bang @ 2017-02-27  9:23 UTC (permalink / raw)
  To: ding

Platform: Windows 7,
          GNU Emacs 24.4.1 (i686-pc-mingw32) of 2014-10-24 on LEG570
          Ma Gnus v0.16 (last standalone git version)

I tried setting up a port forwarding like so:
  ssh -L 143:localhost:143 mysever.mydomain

I then tried setting the IMAP server like this:
(setq gnus-secondary-select-methods
      '((nnimap "privat"
		(nnimap-address "localhost")
                (nnimap-authenticator cram-md5)
                (nnimap-server-port 143))
	))

However this doesn't work.  In the " *nnimap localhost 143 **nntpd*"
buffer, I saw the following (replaced CR with explicit "^M" to be able
to send it in this message):
[CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=CRAM-MD5] Dovecot ready.^M
 BAD CR sent without LF^M
* BAD Error in IMAP command received by server.^M
* BAD Error in IMAP command received by server.^M
* BYE Too many invalid IMAP commands.^M

Process *nnimap* connection broken by remote peer

Does anyone have an idea what could be wrong here?

Thanks!


- Steinar




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

* Re: Problems running IMAP over ssh port forwarding
  2017-02-27  9:23 Problems running IMAP over ssh port forwarding Steinar Bang
@ 2017-02-27 21:50 ` Malcolm Purvis
  2017-02-28  6:39   ` Steinar Bang
  0 siblings, 1 reply; 3+ messages in thread
From: Malcolm Purvis @ 2017-02-27 21:50 UTC (permalink / raw)
  To: ding

>>>>> "Steinar" == Steinar Bang <sb@dod.no> writes:

Steinar> BAD CR sent without LF^M

This seems to be the reason for the errors but I can't think of what the
cause might be.

If it helps, I also use IMAP over port forwarding and my configuration is:

.ssh/.config:

--8<---------------cut here---------------start------------->8---
Host home-tunnel
Port 443
Compression yes
CompressionLevel	9
HostName <external-host>
LocalForward 11143 <internal-ip>:143
LocalForward 11025 <internal-ip>:25
--8<---------------cut here---------------end--------------->8---


.gnus:

--8<---------------cut here---------------start------------->8---
(setq gnus-select-method
    `(nnimap "home"
      (nnimap-address "localhost")
      (nnimap-server-port 11143)
      (nnimap-stream network)
      ;; Splitting rules.
      ;; ...
      ))
--8<---------------cut here---------------end--------------->8---

Malcolm

-- 
		     Malcolm Purvis <malcolm@purvis.id.au>



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

* Re: Problems running IMAP over ssh port forwarding
  2017-02-27 21:50 ` Malcolm Purvis
@ 2017-02-28  6:39   ` Steinar Bang
  0 siblings, 0 replies; 3+ messages in thread
From: Steinar Bang @ 2017-02-28  6:39 UTC (permalink / raw)
  To: ding

>>>>> Malcolm Purvis <malcolm@purvis.id.au>:

>>>>> "Steinar" == Steinar Bang <sb@dod.no> writes:
Steinar> BAD CR sent without LF^M

> This seems to be the reason for the errors but I can't think of what the
> cause might be.

> If it helps, I also use IMAP over port forwarding and my configuration is:

I suddenly remembered that I'm doing something I've never done before:
use the cygwin ssh to do the port forwarding.

Cygwin has issues wrt. CRLF vs. LF, but I wouln't have thought that
would effect port forwarding...?

Thanks for your config, I will try it out.




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

end of thread, other threads:[~2017-02-28  6:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27  9:23 Problems running IMAP over ssh port forwarding Steinar Bang
2017-02-27 21:50 ` Malcolm Purvis
2017-02-28  6:39   ` Steinar Bang

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 NNTP newsgroup(s).