From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/13494 Path: main.gmane.org!not-for-mail From: dubach@dcepea.harvard.edu (Joev Dubach) Newsgroups: gmane.emacs.gnus.general Subject: Re: NNTP authentification for Gnus -- how to? Date: 07 Jan 1998 12:37:24 -0500 Organization: Not likely. Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035152850 9541 80.91.224.250 (20 Oct 2002 22:27:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:27:30 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id JAA18026 for ; Wed, 7 Jan 1998 09:40:00 -0800 Original-Received: from sina.hpc.uh.edu (root@Sina.HPC.UH.EDU [129.7.3.5]) by xemacs.org (8.8.5/8.8.5) with ESMTP id LAA10755 for ; Wed, 7 Jan 1998 11:38:29 -0600 (CST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id LAH22512; Wed, 7 Jan 1998 11:38:40 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 07 Jan 1998 11:35:47 -0600 (CST) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id LAA22499 for ; Wed, 7 Jan 1998 11:35:39 -0600 (CST) Original-Received: (qmail 14804 invoked by uid 504); 7 Jan 1998 17:35:28 -0000 Original-Received: (qmail 14801 invoked from network); 7 Jan 1998 17:35:28 -0000 Original-Received: from sunsite.auc.dk (qmailr@130.225.51.30) by claymore.vcinet.com with SMTP; 7 Jan 1998 17:35:26 -0000 Original-Received: (qmail 2295 invoked by uid 509); 7 Jan 1998 17:35:24 -0000 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: emacs.ding Original-Lines: 55 Original-NNTP-Posting-Host: dcepea.harvard.edu Original-X-Trace: sunsite.auc.dk 884194524 1158 (None) 140.247.197.195 Original-X-Complaints-To: news@sunsite.auc.dk X-Newsreader: Gnus v5.4.66/XEmacs 19.14 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:13494 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:13494 Kai Grossjohann writes: > I seem to be a bit stupid on how to do NNTP authentification for > Gnus. Let's suppose my main NNTP server (i.e. gnus-select-method) is > a public news server that doesn't require user-id and password. Let's > suppose further that I'd also like to have access to several NNTP > servers all requiring different user-ids and/or passwords. In my experience this requires a bit of additional code to work properly: ---- authentication-handling from my .emacs-gnus begins ---- (require 'cl) ; "my-nntp-send-authinfo-from-file" was taken from sample code posted ; to the (ding) Gnus mailing list, and will hopefully be ; incorporated in a future version of Gnus. (defvar my-nntp-authinfo-file "~/.my-nntp-authinfo" "Each line of `my-nntp-authinfo-file' should be of the form: `SERVER USER PASS'.") (defun my-nntp-send-authinfo-from-file () (when (file-exists-p my-nntp-authinfo-file) (nnheader-temp-write nil (insert-file-contents my-nntp-authinfo-file) (goto-char (point-min)) (if (re-search-forward (format "^%s \\([^ \n]+\\) \\([^ \n]+\\)$" nntp-address) 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 'my-nntp-send-authinfo-from-file) ---- authentication-handling from my .emacs-gnus ends ---- ---- .my-nntp-authinfo begins ---- server1 username1 password1 server2 username2 password2 ---- .my-nntp-authinfo ends ---- Hope this helps. Joev "'All my life,' said the manager, half to himself, 'I have wished to see not one Communist but ten close by, not two Nigerians but twenty in their skins, not three cowboy Americans but a gross fresh from the saddle. So when six hothouse roses come in a bouquet, I could not resist potting them. The Dublin winter is long, Meg; this may be the only lit fuse in the whole year. Stand by for the lovely concussion.'" -- Ray Bradbury, "The Cold Wind and the Warm"