X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/265c2fbf11cb8bf9b805df63ecb9508631f08e35..2b44e4584b8b113a8fbfcca6e8980383a77a9717:/lisp/gnus/mail-source.el diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index fc66414a9f..d54377fae1 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -1,6 +1,6 @@ ;;; mail-source.el --- functions for fetching mail -;; Copyright (C) 1999-2012 Free Software Foundation, Inc. +;; Copyright (C) 1999-2014 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news, mail @@ -809,6 +809,10 @@ 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 (if server + (cons (concat "MAILHOST=" server) + process-environment) + process-environment)) result) (when (eq authentication 'password) (setq password @@ -816,8 +820,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 +879,10 @@ 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 (if server + (cons (concat "MAILHOST=" server) + process-environment) + process-environment)) result) (when (eq authentication 'password) (setq password @@ -886,8 +892,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.