From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46677 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: smtpmail: MAIL FROM and `gnus-posting-styles' Date: Tue, 24 Sep 2002 13:44:28 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: <874rcprohi.fsf@ID-56226.news.dfncis.de> <87r8fq18bs.fsf@ID-56226.news.dfncis.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1032867935 5262 127.0.0.1 (24 Sep 2002 11:45:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 24 Sep 2002 11:45:35 +0000 (UTC) Cc: ding@gnus.org Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17to8D-0001Mj-00 for ; Tue, 24 Sep 2002 13:45:33 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17to7W-0003pe-00; Tue, 24 Sep 2002 06:44:50 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 24 Sep 2002 06:45:29 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id GAA10428 for ; Tue, 24 Sep 2002 06:45:16 -0500 (CDT) Original-Received: (qmail 19370 invoked by alias); 24 Sep 2002 11:44:32 -0000 Original-Received: (qmail 19365 invoked from network); 24 Sep 2002 11:44:32 -0000 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net (HELO yxa.extundo.com) (217.13.230.178) by gnus.org with SMTP; 24 Sep 2002 11:44:32 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) by yxa.extundo.com (8.12.6/8.12.6) with ESMTP id g8OBiSn2012177; Tue, 24 Sep 2002 13:44:28 +0200 Original-To: Micha Wiedenmann Mail-Copies-To: nobody X-Hashcash: 0:020924:mw-r1@gmx.de:afa4292fbbb185b2 X-Hashcash: 0:020924:ding@gnus.org:e6f080ed724dc24c In-Reply-To: <87r8fq18bs.fsf@ID-56226.news.dfncis.de> (Micha Wiedenmann's message of "19 Sep 2002 16:25:36 +0200") Original-Lines: 59 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-debian-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46677 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46677 Micha Wiedenmann writes: > Bjørn Mork writes: >>Simon Josefsson writes: >>> Micha Wiedenmann writes: >>> >>>> when sendig a mail composed with `gnus-posting-styles' smtpmail uses >>>> `user-mail-address' to determine "MAIL FROM:". Since >>>> `gnus-posting-styles' already inserted "From: foo" this is confusing and >>>> might be wrong. Is there a way to fix that behavior? >>> >>> Does it work to set user-mail-address in the posting style too? > > AFAICS it is not possible to set buffer-local variables from > `gnus-posting-styles' but I would need buffer-local > `user-mail-addresses' since I use several addresses. Ah. Hm. But can't you set the global variable? If you always use posting styles, the global variable will have the right value. If you don't always use posting, perhaps using a message-sent-hook that restores the global variable could work. > Even if this would be possible I don't think this would help since I use > `message-send-mail-function' value: `gnus-agent-send-mail'. If I am > unplugged mail is stored in nndraft:queue and buffer-local settings > would also lost, wouldn't they? I think posting styles are supposed to be applied even when the message is read from the nndraft:queue group, using the X-Draft-From: header. > I've two ideas: > > · Why does smtpmail use mail-envelope-from but don't try to determine > mail-from from :-) the mail? Well, because the SMTP envelope header is different from the RFC822 header. Perhaps there could be a speciel smtpmail.el feature that used the From: address as SMTP envelope address? This sounds trivial to implement and could perhaps be generally useful. What do you think? Hm. Extending `mail-envelope-from' seems like the right thing. What do you think of the following? (The second :type alternative, `header', is new, the rest is unchanged.) (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 '(choice (string :tag "From-name") (const :tag "Use From: header from message" header) (const :tag "Use `user-mail-address'" nil)) :group 'sendmail) > · Is there a way to make buffer-local variables when the queue is send? I don't know.