(gnus-copy-article-buffer): Bind `inhibit-read-only' to t during modifying the
[elisp/gnus.git-] / lisp / mail-source.el
index 587cb9e..31e1029 100644 (file)
@@ -85,6 +85,7 @@ This variable is a list of mail source specifiers."
        (:program)
        (:function)
        (:password)
+       (:connection)
        (:authentication password))
       (maildir
        (:path "~/Maildir/new/")))
@@ -312,7 +313,7 @@ If ARGS, PROMPT is used as an argument to `format'."
     (when prescript
       (if (and (symbolp prescript) (fboundp prescript))
          (funcall prescript)
-       (call-process shell-file-name nil 0 nil
+       (call-process shell-file-name nil nil nil
                      shell-command-switch 
                      (format-spec
                       prescript
@@ -324,7 +325,7 @@ If ARGS, PROMPT is used as an argument to `format'."
            (when prescript
              (if (and (symbolp prescript) (fboundp prescript))
                  (funcall prescript)
-               (call-process shell-file-name nil 0 nil
+               (call-process shell-file-name nil nil nil
                              shell-command-switch 
                              (format-spec
                               postscript
@@ -351,8 +352,8 @@ If ARGS, PROMPT is used as an argument to `format'."
       (if (and (symbolp prescript)
               (fboundp prescript))
          (funcall prescript)
-       (call-process shell-file-name nil nil nil
-                     shell-command-switch
+       (call-process shell-file-name nil 0 nil
+                     shell-command-switch 
                      (format-spec
                       prescript
                       (format-spec-make ?p password ?t mail-source-crash-box
@@ -360,13 +361,14 @@ If ARGS, PROMPT is used as an argument to `format'."
     (let ((from (format "%s:%s:%s" server user port))
          (mail-source-string (format "pop:%s@%s" user server))
          result)
-      (setq password
-           (or password
-               (cdr (assoc from mail-source-password-cache))
-               (mail-source-read-passwd
-                (format "Password for %s at %s: " user server))))
-      (unless (assoc from mail-source-password-cache)
-       (push (cons from password) mail-source-password-cache))
+      (when (eq authentication 'password)
+       (setq password
+             (or password
+                 (cdr (assoc from mail-source-password-cache))
+                 (mail-source-read-passwd
+                  (format "Password for %s at %s: " user server))))
+       (unless (assoc from mail-source-password-cache)
+         (push (cons from password) mail-source-password-cache)))
       (when server
        (setenv "MAILHOST" server))
       (setq result
@@ -386,7 +388,8 @@ If ARGS, PROMPT is used as an argument to `format'."
                    (pop3-mailhost server)
                    (pop3-port port)
                    (pop3-authentication-scheme
-                    (if (eq authentication 'apop) 'apop 'pass)))
+                    (if (eq authentication 'apop) 'apop 'pass))
+                   (pop3-connection-type connection))
                (save-excursion (pop3-movemail mail-source-crash-box))))))
       (if result
          (prog1
@@ -395,8 +398,8 @@ If ARGS, PROMPT is used as an argument to `format'."
              (if (and (symbolp postscript)
                       (fboundp postscript))
                  (funcall prescript)
-               (call-process shell-file-name nil nil nil
-                             shell-command-switch
+               (call-process shell-file-name nil 0 nil
+                             shell-command-switch 
                              (format-spec
                               postscript
                               (format-spec-make