[gnus git] branch master updated: m0-5-306-gb315576 =1= mail-source.el (mail-source-fetch-pop, mail-source-check-pop): Don't set the MAILHOST environment variable permanently (Bug#14271)

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  b315576d1d87185b01a5b9c2d36565bb635c3b2f (commit)
      from  0ab87d91235597c14500e98b3b3d38e1004ed304 (commit)


- Log -----------------------------------------------------------------
commit b315576d1d87185b01a5b9c2d36565bb635c3b2f
Author: Katsumi Yamaoka <[email protected]>
Date:   Fri Apr 26 10:21:53 2013 +0000

    mail-source.el (mail-source-fetch-pop, mail-source-check-pop): Don't set the MAILHOST environment variable permanently (Bug#14271)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1cff54e..c12c825 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-26  Katsumi Yamaoka  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* message.el (message-bury): Revert 2013-03-18 change.  (Bug#14117)
diff --git a/lisp/mail-source.el b/lisp/mail-source.el
index 9cc2e6a..ff432fc 100644
--- a/lisp/mail-source.el
+++ b/lisp/mail-source.el
@@ -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.

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog      |    5 +++++
 lisp/mail-source.el |    8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.