Gnus development mailing list
 help / color / mirror / Atom feed
From: Janne Rinta-Manty <jrm@iki.fi>
Subject: Re: B c with nnimap: extra newlines
Date: Fri, 14 Jan 2000 12:05:53 GMT	[thread overview]
Message-ID: <xkn66wwn9ie.fsf@tahkokari.cs.Helsinki.FI> (raw)
In-Reply-To: <ilupuv69gsh.fsf@p02.pdc.kth.se>

Simon Josefsson 2000-01-13T16:14:25Z:
SJ> Are you using SSH port-forwarding?  Perhaps it doesn't preserve
SJ> CRLF?  Was that the reason for changing `imap-client-eol'?

No port-forwarding - I added ssh straight into imap streams (mostly by
adapting code from the other streams' functions). The reason for
changing imap-client-eol was that commands sent to the server with
"\r\n" didn't work but "\n" was OK. I suspect there must be something
wrong with my hack then?

(BTW the SSH connection is pre-authenticated.)

(defvar imap-ssh-program "ssh -p %p %s exec /etc/rimapd"
  "Program for SSH connection.
The %s is replaced with server and %p with port.")

(setq imap-streams '(ssh kerberos4 ssl network))

(setq imap-stream-alist
      '((ssh       imap-ssh-p        imap-ssh-open)
	(kerberos4 imap-kerberos4s-p imap-kerberos4-open)
	(ssl       imap-ssl-p        imap-ssl-open)
	(network   imap-network-p    imap-network-open)))

(setq nnimap-stream 'ssh)
(setq nnimap-authenticator 'ssh)

(setq imap-authenticators '(ssh kerberos4 cram-md5 login anonymous))

(setq imap-authenticator-alist
      '((ssh       imap-ssha-p       imap-ssh-auth)
	(kerberos4 imap-kerberos4a-p imap-kerberos4-auth)
	(cram-md5  imap-cram-md5-p   imap-cram-md5-auth)
	(login     imap-login-p      imap-login-auth)
	(anonymous imap-anonymous-p  imap-anonymous-auth)))

(defun imap-ssha-p (buffer)
  t)

(defun imap-ssh-auth (buffer)
  (eq imap-stream 'ssh))

(defconst imap-default-ssh-port 22)

(defun imap-ssh-p (buffer)
  t)

(defun imap-ssh-open (name buffer server port)
  (message "imap: Opening ssh connection to %s..." server)
  (let* ((port (or port imap-default-ssh-port))
	 (coding-system-for-read imap-coding-system-for-read)
	 (coding-system-for-write imap-coding-system-for-write)
	 (process (start-process
		   name buffer shell-file-name shell-command-switch
		   (format-spec
		    imap-ssh-program
		    (format-spec-make ?s server ?p (number-to-string port))))))
    (when process
      (with-current-buffer buffer
	(goto-char (point-min))
	(while (and (memq (process-status process) '(open run))
		    (goto-char (point-max))
		    (forward-line -1)
		    (not (imap-parse-greeting)))
	  (accept-process-output process 1)
	  (sit-for 1))
	(and imap-log
	     (with-current-buffer (get-buffer-create imap-log)
	       (imap-disable-multibyte)
	       (buffer-disable-undo)
	       (goto-char (point-max))
	       (insert-buffer-substring buffer)))
	(erase-buffer))
      (when (memq (process-status process) '(open run))
	process))))

SJ> Anyway, I think there was a bug involved when modifying
SJ> `imap-client-eol'. Could you please back out your patch and test
SJ> this instead?

Ok, tested it, and it made gnus hang (waiting for something from IMAP
server?) when I tried to copy a message. Pressed C-g and tried to quit
the group with Q (q made it hang again), and got this:

Signaling: (error "Internal error, tag 570 status BAD code nil text Argument given to APPEND when none expected")
  signal(error ("Internal error, tag 570 status BAD code nil text Argument given to APPEND when none expected"))
  error("Internal error, tag %s status %s code %s text %s" 570 BAD nil "Argument given to APPEND when none expected")
  imap-parse-response()
  imap-arrival-filter(#<process imap> "570 BAD Argument given to APPEND when none expected\r\n")
  accept-process-output(#<process imap> 1)
  imap-wait-for-tag(573 nil)
  imap-send-command-wait("SELECT \"Mail/fetchmail\"")
  imap-mailbox-select-1("Mail/fetchmail" nil)
  imap-mailbox-select("Mail/fetchmail")
  nnimap-possibly-change-group("Mail/fetchmail" "porsta")
  nnimap-close-group("Mail/fetchmail" "porsta")
  gnus-close-group("nnimap+porsta:Mail/fetchmail")
  gnus-summary-exit-no-update()
* call-interactively(gnus-summary-exit-no-update)

-- 
Janne Rinta-Mänty



      reply	other threads:[~2000-01-14 12:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-15 13:42 Janne Rinta-Manty
2000-01-13 14:13 ` Janne Rinta-Manty
2000-01-13 14:39   ` Simon Josefsson
2000-01-14 12:05     ` Janne Rinta-Manty [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xkn66wwn9ie.fsf@tahkokari.cs.Helsinki.FI \
    --to=jrm@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).