mail-source.el (mail-source-fetch-pop, mail-source-check-pop): Don't set the MAILHOST...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 26 Apr 2013 10:21:53 +0000 (10:21 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 26 Apr 2013 10:21:53 +0000 (10:21 +0000)
lisp/ChangeLog
lisp/mail-source.el

index 1cff54e..c12c825 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-26  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mail-source.el (mail-source-fetch-pop, mail-source-check-pop):
+       Don't set the MAILHOST environment variable permanently (Bug#14271).
+
 2013-04-26  Glenn Morris  <rgm@gnu.org>
 
        * message.el (message-bury): Revert 2013-03-18 change.  (Bug#14117)
index 9cc2e6a..ff432fc 100644 (file)
@@ -809,6 +809,8 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
      prescript-delay)
     (let ((from (format "%s:%s:%s" server user port))
          (mail-source-string (format "pop:%s@%s" user server))
+         (process-environment (append (list (concat "MAILHOST=" server))
+                                      process-environment))
          result)
       (when (eq authentication 'password)
        (setq password
@@ -816,8 +818,6 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
                  (cdr (assoc from mail-source-password-cache))
                  (read-passwd
                   (format "Password for %s at %s: " user server)))))
-      (when server
-       (setenv "MAILHOST" server))
       (setq result
            (cond
             (program
@@ -877,6 +877,8 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
   (mail-source-bind (pop source)
     (let ((from (format "%s:%s:%s" server user port))
          (mail-source-string (format "pop:%s@%s" user server))
+         (process-environment (append (list (concat "MAILHOST=" server))
+                                      process-environment))
          result)
       (when (eq authentication 'password)
        (setq password
@@ -886,8 +888,6 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
                   (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
            (cond
             ;; No easy way to check whether mail is waiting for these.