From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/11017 Path: main.gmane.org!not-for-mail From: Shuhei KOBAYASHI Newsgroups: gmane.emacs.gnus.general Subject: Re: Authinfo & multiple servers Date: 22 May 1997 04:34:19 +0900 Organization: Japan Advanced Institute of Science and Technology, Hokuriku. Message-ID: References: <199705202144.QAA26198@tigger.beckman.uiuc.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by SEMI MIME-Edit 0.80) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035150797 27790 80.91.224.250 (20 Oct 2002 21:53:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:53:17 +0000 (UTC) Return-Path: Original-Received: from sandy.calag.com (root@sandy [206.190.83.128]) by altair.xemacs.org (8.8.5/8.8.5) with ESMTP id OAA17774 for ; Wed, 21 May 1997 14:11:04 -0700 Original-Received: from deanna.miranova.com (root@deanna [206.190.83.1]) by sandy.calag.com (8.8.5/8.8.5) with ESMTP id OAA19876 for ; Wed, 21 May 1997 14:10:31 -0700 Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by deanna.miranova.com (8.8.5/8.8.5) with ESMTP id OAA20647 for ; Wed, 21 May 1997 14:10:36 -0700 Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by xemacs.org (8.8.5/8.8.5) with SMTP id QAA27932 for ; Wed, 21 May 1997 16:09:29 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Wed, 21 May 1997 21:34:37 +0200 Original-Received: (qmail 7956 invoked by uid 504); 21 May 1997 19:34:36 -0000 Original-Received: (qmail 7953 invoked from network); 21 May 1997 19:34:35 -0000 Original-Received: from mikan.jaist.ac.jp (150.65.8.6) by claymore.vcinet.com with SMTP; 21 May 1997 19:34:34 -0000 Original-Received: from silicon.jaist.ac.jp (Shuhei KOBAYASHI ) by mikan.jaist.ac.jp (8.7.5); id EAA01539; Thu, 22 May 1997 04:34:21 +0900 (JST) Original-Received: by silicon.jaist.ac.jp (4.1/JE-C); Thu, 22 May 97 04:34:20 JST Original-To: ding@gnus.org In-Reply-To: Baba Z Buehler's message of Tue, 20 May 1997 16:44:28 -0500 X-Mailer: Gnus v5.4.53 with SEMI patch X-Emacs: Emacs 19.34.94, MULE 3.0 =?ISO-2022-JP?B?KBskQjlITVUybBsoQik=?= Original-Lines: 37 Original-Xref: altair.xemacs.org dgnus-list:1403 Xref: main.gmane.org gmane.emacs.gnus.general:11017 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:11017 >>>>> In <199705202144.QAA26198@tigger.beckman.uiuc.edu>, >>>>> Baba Z Buehler wrote: > I want to use multiple news servers, some of which require user/pass > authentication. Ideally, I'd like Gnus to automatically log me in > (or prompt) for the servers that require authentication, and just > jump right in on the ones that don't. I'm using modified version of `nntp-send-authinfo-from-file' to connect servers that require authentication. (defvar nntp-authinfo-file "~/.nntp-authinfo" "Each line of `nntp-authinfo-file' should be of the form: `SERVER:PORT USER PASS'.") (defun nntp-send-authinfo-from-file () (when (file-exists-p nntp-authinfo-file) (nnheader-temp-write nil (insert-file-contents nntp-authinfo-file) (goto-char (point-min)) (if (re-search-forward (format "^%s:%s \\([^ \n]+\\) \\([^ \n]+\\)$" nntp-address (if (stringp nntp-port-number) nntp-port-number (int-to-string nntp-port-number))) nil t nil) (let ((user (match-string 1)) (pass (match-string 2))) (nntp-send-command "^.*\r?\n" "AUTHINFO USER" user) (nntp-send-command "^.*\r?\n" "AUTHINFO PASS" pass)))))) (add-hook 'nntp-server-opened-hook 'nntp-send-authinfo-from-file) -- Shuhei KOBAYASHI /