Mercurial > emacs
changeset 38308:2ec4983f57eb
(mail-specify-envelope-from): Doc fix.
(mail-envelope-from): New user option.
(sendmail-send-it): Use it.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 06 Jul 2001 10:30:49 +0000 |
parents | 37d58b4d2619 |
children | 89afde91354f |
files | lisp/mail/sendmail.el |
diffstat | 1 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/sendmail.el Fri Jul 06 10:30:12 2001 +0000 +++ b/lisp/mail/sendmail.el Fri Jul 06 10:30:49 2001 +0000 @@ -67,7 +67,8 @@ ;;;###autoload (defcustom mail-specify-envelope-from nil "*If non-nil, specify the envelope-from address when sending mail. -The value used to specify it is whatever is found in `user-mail-address'. +The value used to specify it is whatever is found in +`mail-envelope-from', with `user-mail-address' as fallback. On most systems, specifying the envelope-from address is a privileged operation." @@ -75,6 +76,14 @@ :type 'boolean :group 'sendmail) +(defcustom mail-envelope-from nil + "*If non-nil, designate the envelope-from address when sending mail. +If this is nil while `mail-specify-envelope-from' is non-nil, the +content of `user-mail-address' is used." + :version "21.1" + :type 'boolean + :group 'sendmail) + ;;;###autoload (defcustom mail-self-blind nil "\ *Non-nil means insert BCC to self in messages to be sent. @@ -801,8 +810,7 @@ (mailbuf (current-buffer)) (program (if (boundp 'sendmail-program) sendmail-program - "/usr/lib/sendmail")) - (originator user-mail-address)) + "/usr/lib/sendmail"))) (unwind-protect (save-excursion (set-buffer tembuf) @@ -968,8 +976,9 @@ (append (list (point-min) (point-max) program nil errbuf nil "-oi") - (and mail-specify-envelope-from - (list "-f" originator)) + (and mail-specify-envelope-from + (list "-f" (or mail-envelope-from + user-mail-address))) ;;; ;; Don't say "from root" if running under su. ;;; (and (equal (user-real-login-name) "root") ;;; (list "-f" (user-login-name)))