;; Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
;; Maintainer: FSF
;; Keywords: mail
-;; Version: 1.3s
;; This file is part of GNU Emacs.
(require 'mail-utils)
-(defconst pop3-version "1.3s")
-
(defvar pop3-maildrop (or (user-login-name) (getenv "LOGNAME") (getenv "USER") nil)
"*POP3 maildrop.")
(defvar pop3-mailhost (or (getenv "MAILHOST") nil)
(autoload 'starttls-open-stream "starttls")
(autoload 'starttls-negotiate "starttls"))
+(defvar pop3-ssl-program-name
+ (if (exec-installed-p "openssl")
+ "openssl"
+ "ssleay")
+ "The program to run in a subprocess to open an SSL connection.")
+
(defvar pop3-ssl-program-arguments
'("s_client" "-quiet")
"Arguments to be passed to the program `pop3-ssl-program-name'.")
(defun pop3-open-ssl-stream-1 (name buffer host service extra-arg)
(require 'path-util)
(let* ((ssl-program-name
- (cond ((exec-installed-p "openssl")
- "openssl")
- (t
- "ssleay")))
+ pop3-ssl-program-name)
(ssl-program-arguments
`(,@pop3-ssl-program-arguments ,extra-arg
"-connect" ,(format "%s:%d" host service)))
)
(defun pop3-read-response (process &optional return)
- "Read the response from the server PROCESS.
-Return the response string if optional second argument RETURN is non-nil."
+ "Read the response from the server.
+Return the response string if optional second argument is non-nil."
(let ((case-fold-search nil)
match-end)
(save-excursion
(lambda (atom)
(when (car (symbol-value atom))
(insert (format "%s\n" atom))))
- pop3-uidl-obarray)))))
-
+ pop3-uidl-obarray)))
+ (fillarray pop3-uidl-obarray 0)))
+
;; The Command Set
(save-excursion
(set-buffer (process-buffer process))
(goto-char (point-max))
- (delete-process process)
- ))
- (when pop3-leave-mail-on-server
- (mapatoms
- (lambda (atom)
- (when (car (symbol-value atom))
- (unintern atom pop3-uidl-obarray)))
- pop3-uidl-obarray)))
+ (delete-process process))))
(defun pop3-uidl (process &optional msgno)
"Return the results of a UIDL command in PROCESS for optional MSGNO.