From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/27092 Path: main.gmane.org!not-for-mail From: "Rupa Schomaker (list)" Newsgroups: gmane.emacs.gnus.general Subject: [patch] Use user-mail-address as set by posting-styles Date: 19 Nov 1999 07:01:45 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035164180 22841 80.91.224.250 (21 Oct 2002 01:36:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:36:20 +0000 (UTC) Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id KAA17323 for ; Fri, 19 Nov 1999 10:02:51 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id JAB09597; Fri, 19 Nov 1999 09:02:43 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 19 Nov 1999 09:02:33 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id JAA06494 for ; Fri, 19 Nov 1999 09:02:23 -0600 (CST) Original-Received: from gw.rupa.com (postfix@cx1823-a.alsv1.occa.home.com [24.5.151.91]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id KAA17312 for ; Fri, 19 Nov 1999 10:01:53 -0500 (EST) Original-Received: by gw.rupa.com (Postfix, from userid 500) id 305B41D1D4; Fri, 19 Nov 1999 07:01:46 -0800 (PST) Original-To: ding@gnus.org Mail-Copies-To: never Original-Lines: 20 User-Agent: Gnus/5.070096 (Pterodactyl Gnus v0.96) XEmacs/21.1 (20 Minutes to Nikko) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:27092 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:27092 --=-=-= Attached is a patch that uses the user-mail-address (as set from posting-styles) as an argument to senmdail -f. This ensures that the envelope matches the From: which is preferable in all cases for me. Mail list managers, funky mail programs (like outlook), and mail gateways (notes<-->smtp) seem to place more trust in the envelope than the From: header. Lars, I noticed that message-generate-new-buffer-clone-locals takes an optional second argument according to the documentation. However, the actual code doesn't work that way -- the actual argument is ignored. This isn't used much so it probably isn't a big deal, but maybe the arg list should be modified to reflect the real behavior. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=sendmail-user-same-as-mail.patch Content-Description: Use user-mail-address from posting-styles Index: gnus-msg.el =================================================================== RCS file: /home/cvs/cvsroot/elisp/pgnus/lisp/gnus-msg.el,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 gnus-msg.el --- gnus-msg.el 1999/07/20 18:20:36 1.1.1.2 +++ gnus-msg.el 1999/11/18 20:10:57 @@ -1192,6 +1192,8 @@ (when (or name address) (add-hook 'message-setup-hook `(lambda () + (set (make-local-variable 'user-mail-address) + ,(or (cdr address) user-mail-address)) (let ((user-full-name ,(or (cdr name) user-full-name)) (user-mail-address ,(or (cdr address) user-mail-address))) Index: message.el =================================================================== RCS file: /home/cvs/cvsroot/elisp/pgnus/lisp/message.el,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 message.el --- message.el 1999/09/03 18:17:37 1.1.1.4 +++ message.el 1999/11/18 21:03:20 @@ -2130,7 +2130,7 @@ (defun message-send-mail-with-sendmail () "Send off the prepared buffer with sendmail." (let ((errbuf (if message-interactive - (generate-new-buffer " sendmail errors") + (message-generate-new-buffer-clone-locals " sendmail errors") 0)) resend-to-addresses delimline) (let ((case-fold-search t)) @@ -2167,7 +2167,11 @@ ;; But some systems are more broken with -f, so ;; we'll let users override this. (if (null message-sendmail-f-is-evil) - (list "-f" (user-login-name))) + (list "-f" + (if (null user-mail-address) + (user-login-name) + (user-mail-address)) + )) ;; These mean "report errors by mail" ;; and "deliver in background". (if (null message-interactive) '("-oem" "-odb")) @@ -4088,7 +4092,7 @@ (let ((locals (save-excursion (set-buffer buffer) (buffer-local-variables))) - (regexp "^gnus\\|^nn\\|^message")) + (regexp "^gnus\\|^nn\\|^message\\|^user-mail-address")) (mapcar (lambda (local) (when (and (consp local) --=-=-= -- Rupa (rupa@rupa.com for normal email) Please don't email duplicate replies. --=-=-=--