+2002-06-28 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nntp.el (nntp-via-rlogin-command-switches): New variable.
+ (nntp-open-via-rlogin-and-telnet): Re-revert; use the var above.
+
2002-06-28 Kai Gro\e,b_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* message.el (message-font-lock-keywords): Don't fontify
This command is used by the `nntp-open-via-rlogin-and-telnet' method.
The default is \"rsh\", but \"ssh\" is a popular alternative.")
+(defvoo nntp-via-rlogin-command-switches nil
+ "*Switches given to the rlogin command `nntp-via-rlogin-command'.
+Set this to (\"-t\") if you use \"ssh\" for `nntp-via-rlogin-command' and
+the telnet command requires a pseudo-tty allocation on an intermediate
+host.")
+
(defvoo nntp-via-telnet-command "telnet"
"*Telnet command used to connect to an intermediate host.
This command is used by the `nntp-open-via-telnet-and-telnet' method.")
- `nntp-end-of-line'."
(let ((command `(,nntp-via-address
,nntp-telnet-command
- ,@nntp-telnet-switches
- ,nntp-address ,nntp-port-number))
+ ,@nntp-telnet-switches))
proc)
- (and nntp-via-user-name
- (setq command `("-l" ,nntp-via-user-name ,@command)))
+ (when nntp-via-user-name
+ (setq command `("-l" ,nntp-via-user-name ,@command)))
+ (when nntp-via-rlogin-command-switches
+ (setq command (append nntp-via-rlogin-command-switches command)))
(push nntp-via-rlogin-command command)
(and nntp-pre-command
(push nntp-pre-command command))
(setq proc (apply 'start-process "nntpd" buffer command))
(save-excursion
(set-buffer buffer)
+ (nntp-wait-for-string "^r?telnet")
+ (process-send-string proc (concat "open " nntp-address
+ " " nntp-port-number "\n"))
(nntp-wait-for-string "^\r*20[01]")
(beginning-of-line)
(delete-region (point-min) (point))
(nntp-via-rlogin-command "ssh")
@end lisp
+See also @code{nntp-via-rlogin-command-switches}.
+
If you're behind a firewall, but have direct access to the outside world
through a wrapper command like "runsocks", you could open a socksified
telnet connection to the news server as follows:
@vindex nntp-via-rlogin-command
Command used to log in on the intermediate host. The default is
@samp{rsh}, but @samp{ssh} is a popular alternative.
+
+@item nntp-via-rlogin-command-switches
+@vindex nntp-via-rlogin-command-switches
+List of strings to be used as the switches to
+@code{nntp-via-rlogin-command}. The default is @code{nil}. Set this to
+@samp{("-t")} if you use @samp{ssh} for @code{nntp-via-rlogin-command}
+and the telnet command requires a pseudo-tty allocation on an
+intermediate host.
@end table
@item nntp-open-via-telnet-and-telnet