From: Chris Hanson Date: Thu, 12 Oct 1995 22:47:48 +0000 (+0000) Subject: Change to support (FILE ) password option for POP mail. X-Git-Tag: 20090517-FFI~5900 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=7b06c46e677540f25be77001e5ca5a203c1815fd;p=mit-scheme.git Change to support (FILE ) password option for POP mail. --- diff --git a/v7/src/edwin/os2.scm b/v7/src/edwin/os2.scm index 8d272c383..2b2e7ebd9 100644 --- a/v7/src/edwin/os2.scm +++ b/v7/src/edwin/os2.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: os2.scm,v 1.22 1995/10/03 21:14:24 cph Exp $ +;;; $Id: os2.scm,v 1.23 1995/10/12 22:47:48 cph Exp $ ;;; ;;; Copyright (c) 1994-95 Massachusetts Institute of Technology ;;; @@ -714,15 +714,17 @@ filename suffix \".gz\"." directory)))) (let ((buffer (temporary-buffer "*popclient*"))) (let ((status.reason - (run-synchronous-process #f (buffer-end buffer) #f #f - "popclient" - (if (ref-variable rmail-pop-delete) - "-3" - "-3 -k") - "-u" user-name - "-p" password - "-o" target - server))) + (let ((args + (list "-u" user-name + "-p" (os2-pop-client-password password) + "-o" target + server))) + (apply run-synchronous-process #f (buffer-end buffer) #f #f + "popclient" + "-3" + (if (ref-variable rmail-pop-delete) + args + (cons "-k" args)))))) (if (and (eq? 'EXITED (car status.reason)) (memv (cdr status.reason) '(0 1))) (kill-buffer buffer) @@ -731,6 +733,16 @@ filename suffix \".gz\"." (editor-error "Error getting mail from POP server."))))) target)) +(define (os2-pop-client-password password) + (cond ((string? password) + password) + ((and (pair? password) (eq? 'FILE (car password))) + (call-with-input-file (cadr password) + (lambda (port) + (read-string (char-set #\newline) port)))) + (else + (error "Illegal password:" password)))) + (define-variable rmail-pop-delete "If true, messages are deleted from the POP server after being retrieved. Otherwise, messages remain on the server and will be re-fetched later."