diff --git a/lisp/nntp.el b/lisp/nntp.el index 58135a1..1a9cf55 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -258,6 +258,9 @@ to insert Cancel-Lock headers.") This is usually slower, but on misconfigured servers that don't update their active files often, this can help.") +(defvoo nntp-auth t + "If nil, never try to authenticate NNTP.") + ;;; Internal variables. (defvoo nntp-retrieval-in-progress nil) @@ -1191,11 +1194,12 @@ If SEND-IF-FORCE, only send authinfo to the server if the (let* ((list (netrc-parse nntp-authinfo-file)) (alist (netrc-machine list nntp-address "nntp")) (auth-info - (nth 0 (auth-source-search - :max 1 - :host (list nntp-address (nnoo-current-server 'nntp)) - :port `("119" "nntp" ,(format "%s" nntp-port-number) - "563" "nntps" "snews")))) + (when nntp-auth + (nth 0 (auth-source-search + :max 1 + :host (list nntp-address (nnoo-current-server 'nntp)) + :port `("119" "nntp" ,(format "%s" nntp-port-number) + "563" "nntps" "snews"))))) (auth-user (plist-get auth-info :user)) (auth-force (plist-get auth-info :force)) (auth-passwd (plist-get auth-info :secret))