summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-06-12 17:55:03 +0000
committerRichard M. Stallman <rms@gnu.org>1996-06-12 17:55:03 +0000
commita17dc8f07dcfe6ba3b5238a5ed21702009af6d8e (patch)
treea6f05fe78c57047f00416d14731eee04ffc531bf
parent5efe49a096d84d6a4071199211a7b06c93d4d26d (diff)
downloademacs-a17dc8f07dcfe6ba3b5238a5ed21702009af6d8e.tar.gz
(nnmail-move-inbox): Prompt for POP3 password if
required, and include on the movemail command line.
-rw-r--r--lisp/nnmail.el30
1 files changed, 20 insertions, 10 deletions
diff --git a/lisp/nnmail.el b/lisp/nnmail.el
index 30b4741b37b..6eb69d33c0b 100644
--- a/lisp/nnmail.el
+++ b/lisp/nnmail.el
@@ -367,13 +367,19 @@ performed.")
;; and the actual inbox is /usr/spool/mail/foo/foo.
(if (file-directory-p inbox)
(setq inbox (expand-file-name (user-login-name) inbox))))
- (if popmail
- (message "Getting mail from post office ...")
- (if (or (and (file-exists-p tofile)
- (/= 0 (nth 7 (file-attributes tofile))))
- (and (file-exists-p inbox)
- (/= 0 (nth 7 (file-attributes inbox)))))
- (message "Getting mail from %s..." inbox)))
+ (cond
+ (popmail
+ (if (and rmail-pop-password-required (not rmail-pop-password))
+ (setq rmail-pop-password
+ (rmail-read-passwd
+ (format "Password for %s: "
+ (substring tofile (+ popmail 3))))))
+ (message "Getting mail from post office ..."))
+ ((or (and (file-exists-p tofile)
+ (/= 0 (nth 7 (file-attributes tofile))))
+ (and (file-exists-p inbox)
+ (/= 0 (nth 7 (file-attributes inbox)))))
+ (message "Getting mail from %s..." inbox)))
;; Set TOFILE if have not already done so, and
;; rename or copy the file INBOX to TOFILE if and as appropriate.
(cond ((or (file-exists-p tofile) (and (not popmail)
@@ -398,9 +404,13 @@ performed.")
(save-excursion
(setq errors (generate-new-buffer " *nnmail loss*"))
(buffer-disable-undo errors)
- (call-process
- (expand-file-name nnmail-movemail-program exec-directory)
- nil errors nil inbox tofile)
+ (if rmail-pop-password
+ (call-process
+ (expand-file-name nnmail-movemail-program exec-directory)
+ nil errors nil inbox tofile rmail-pop-password)
+ (call-process
+ (expand-file-name nnmail-movemail-program exec-directory)
+ nil errors nil inbox tofile))
(if (not (buffer-modified-p errors))
;; No output => movemail won
nil