Gnus development mailing list
 help / color / mirror / Atom feed
From: Jason R Mastaler <jason@mastaler.com>
Subject: Re: Authentication?
Date: 18 Aug 1997 14:52:59 -0600	[thread overview]
Message-ID: <x7zpqfxlg4.fsf@mastaler.com> (raw)
In-Reply-To: Kevin Cheek's message of "18 Aug 1997 15:47:28 -0400"

Kevin Cheek <kcheek@umich.edu> writes:

> Thanks for the suggestion, but that doesn't fix the problem I'm
> having.
> 
> The problem I am running into is that Gnus hangs during or right after
> sending the AUTHINFO. With either nntp-send-nosy-authinfo or the
> nntp-send-nosy-authinfo-from-file that you posted, Gnus simply
> hangs. This problem was mentioned in several messages on this list (in
> July, I think), but apparently no solution was ever found except to
> hit C-g, which would allow them to read news. Unfortunately, hitting
> C-g does not work for me as that simply causes Gnus to "Quit".
> 
> Does anyone know why Gnus hangs when using authentication?

I was the one who posted the questions in July, and a couple solutions
were in fact found.  One of which I posted, the other which I sent you
in a private e-mail.  Both fixed the hanging right after sending
AUTHINFO problem for me and several other people.  Have you tried both
of them?  Can you access this authenticated news server from the same
machine using another newsreader such as Netscape Navigator?

To reiterate, you should be able to get things working by adding 
either one (but not both) of the following to your .gnus or .emacs.

*interactively*
----
(add-hook 'nntp-server-opened-hook 'nntp-send-mode-reader)         
(add-hook 'nntp-server-opened-hook 'nntp-send-nosy-authinfo)          
(setq nntp-authinfo-function (function nntp-send-nosy-authinfo))
----

*reading authinfo from file*
----
(add-hook 'nntp-server-opened-hook
          (lambda ()
            (cond ((string-match "something.com" nntp-address)
                   (nntp-send-nosy-authinfo-from-file))
                  (t
                    ))))
 
(defun nntp-send-nosy-authinfo-from-file ()
  "Send the AUTHINFO to the nntp server, including username and password
  This function is supposed to be called from `nntp-server-opened-hook'."
  (when (file-exists-p "~/.nntp-authinfo")
    (nnheader-temp-write nil
      (insert-file-contents "~/.nntp-authinfo")
      (goto-char (point-min))
      (nntp-send-command
       "^.*\r?\n" "AUTHINFO USER"
       (buffer-substring (point) (progn (end-of-line) (point))))
      (goto-line 2)
      (nntp-send-command 
       "^.*\r?\n" "AUTHINFO PASS" 
       (buffer-substring (point) (progn (end-of-line) (point)))))))
----

   Jason R. Mastaler                      jason@mastaler.com
 


      parent reply	other threads:[~1997-08-18 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-17 18:22 Authentication? Kevin Cheek
1997-08-17 19:47 ` Authentication? Jason R Mastaler
1997-08-18 19:47   ` Authentication? Kevin Cheek
1997-08-18 20:28     ` Authentication? Rolf Marvin B|e Lindgren
1997-08-18 20:52     ` Jason R Mastaler [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=x7zpqfxlg4.fsf@mastaler.com \
    --to=jason@mastaler.com \
    /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).