From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/3917 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.user Subject: Re: smtpmail.el, user-mail-address and posting styles Date: Fri, 25 Jun 2004 13:02:10 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669950 20967 80.91.229.2 (31 Jan 2006 01:12:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:12:30 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:32:57 2006 Original-Path: quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: fnatte.nada.kth.se Original-X-Trace: quimby.gnus.org 1088161332 18051 130.237.226.103 (25 Jun 2004 11:02:12 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Fri, 25 Jun 2004 11:02:12 +0000 (UTC) User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:ZcfbFBZ6TBZkmfi47euH45pro4k= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:4058 Original-Lines: 51 X-Gnus-Article-Number: 4058 Tue Jan 17 17:32:57 2006 Xref: news.gmane.org gmane.emacs.gnus.user:3917 Archived-At: Matthias Riese writes: > Hi, > > It seems smtpmail.el ignores the posting styles when issuing the "MAIL FROM:" > and uses the global value of user-mail-address instead of the address set via > posting styles. > > This is a problem because AFAICS the Return-Path is set to the > address from the "MAIL FROM:". > > I use something like this: > > (setq gnus-posting-styles > '( > ; Default style for mail > ("^nnml:" > (address "email@address.de") > (signature-file "~/Mail/signature.default")))) > > When I try to send mail, smtpmail generates the address of MAIL FROM > from my login name and local host name. When I > > (setq user-mail-address "email@address2.de") > > smtpmail.el always uses "email@address2.de" and never "email@address.de". > > Something wrong with my posting styles or is it a bug in smtpmail.el? You could try setting the smtpmail variable in the posting style: (setq gnus-posting-styles '( ; Default style for mail ("^nnml:" (address "email@address.de") (user-mail-address "email@address.de") (signature-file "~/Mail/signature.default")))) Emacs smtpmail.el in CVS can be configured to use the From: line in MAIL FROM, try: (setq mail-specify-envelope-from t mail-envelope-from 'header) The reason this isn't the default is that MAIL FROM and From: really are distinct things, and it isn't clear whether which approach is more common. E.g., either MAIL FROM needs to be user-mail-address for authentication purposes etc and From: can be anything, or that MAIL FROM should be the same as the From: line, for privacy reasons etc. In this case, backwards compatibility was the deciding factor.