From 9b0979a8958bd6eda04762e34d0f127e6542abea Mon Sep 17 00:00:00 2001 From: keiichi Date: Mon, 9 Aug 1999 05:08:01 +0000 Subject: [PATCH] (nnmail-movemail-program-pop-password-required): New variable. (nnmail-exec-movemail-program): Require password, when needed. (TopLevel): Remove autoload cookie. (nnmail-pop3-movemail): Require `pop3'. --- lisp/nnmail.el | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index e348952..2a2d476 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -260,6 +260,12 @@ The default is \"-A\"." :group 'nnmail-retrieve :type 'string) +(defcustom nnmail-movemail-program-pop-password-required t + "*Non-nil if a password is required when reading mail using POP +with `movemail' external program." + :group 'nnmail-retrieve + :type 'boolean) + (defcustom nnmail-pop-password-required nil "*Non-nil if a password is required when reading mail using POP." :group 'nnmail-retrieve @@ -1874,10 +1880,15 @@ If ARGS, PROMPT is used as an argument to `format'." (inbox-info (nnmail-parse-spool-file-name inbox)) args) (if popmail - (let ((auth-scheme (car (cdr (memq :auth-scheme inbox-options))))) + (let ((auth-scheme (car (cdr (memq :auth-scheme inbox-options)))) + (password + (or nnmail-internal-password + (and nnmail-movemail-program-pop-password-required + (nnmail-read-passwd + (format "Password for %s: " inbox)))))) (setenv "MAILHOST" (nnmail-spool-mailhost inbox-info)) - (when nnmail-internal-password - (push nnmail-internal-password args)) + (when password + (push password args)) (push tofile args) (push (concat "po:" (nnmail-spool-maildrop inbox-info)) args) (cond @@ -1893,13 +1904,12 @@ If ARGS, PROMPT is used as an argument to `format'." nil err-buf nil args))) -(eval-and-compile - (autoload 'pop3-movemail "pop3")) (eval-when-compile (require 'pop3)) (defun nnmail-pop3-movemail (inbox crashbox options) "Function to move mail from INBOX on a pop3 server to file CRASHBOX." + (require 'pop3) (let* ((inbox-info (nnmail-parse-spool-file-name inbox)) (pop3-maildrop (or (nnmail-spool-maildrop inbox-info) pop3-maildrop)) -- 1.7.10.4