summaryrefslogtreecommitdiff
path: root/lisp/mail/sendmail.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail/sendmail.el')
-rw-r--r--lisp/mail/sendmail.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 967655e7a2d..b9e8853d00f 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -846,10 +846,12 @@ the user from the mailer."
nil errbuf nil "-oi")
;; Always specify who from,
;; since some systems have broken sendmails.
- (list "-f" (user-login-name))
- ;;; ;; Don't say "from root" if running under su.
- ;;; (and (equal (user-real-login-name) "root")
- ;;; (list "-f" (user-login-name)))
+ ;; unless user has said no.
+ (if (memq mail-from-style '(angles parens nil))
+ (list "-f" (user-login-name)))
+;;; ;; Don't say "from root" if running under su.
+;;; (and (equal (user-real-login-name) "root")
+;;; (list "-f" (user-login-name)))
(and mail-alias-file
(list (concat "-oA" mail-alias-file)))
(if mail-interactive