Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: smtpmail: MAIL FROM and `gnus-posting-styles'
Date: Tue, 24 Sep 2002 13:44:28 +0200	[thread overview]
Message-ID: <iluvg4v8vdv.fsf@latte.josefsson.org> (raw)
In-Reply-To: <87r8fq18bs.fsf@ID-56226.news.dfncis.de> (Micha Wiedenmann's message of "19 Sep 2002 16:25:36 +0200")

Micha Wiedenmann <mw-u1@gmx.de> writes:

> Bjørn Mork writes:
>>Simon Josefsson <jas@extundo.com> writes:
>>> Micha Wiedenmann <mw-u1@gmx.de> 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.




  parent reply	other threads:[~2002-09-24 11:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-17 14:37 Micha Wiedenmann
2002-09-17 17:00 ` Simon Josefsson
2002-09-17 20:47   ` Bjørn Mork
2002-09-19 14:25     ` Micha Wiedenmann
2002-09-19 17:30       ` Kai Großjohann
2002-09-21  0:42         ` Micha Wiedenmann
     [not found]       ` <mit.lcs.mail.ding/87r8fq18bs.fsf@ID-56226.news.dfncis.de>
2002-09-23 19:20         ` Patrick J. LoPresti
2002-09-24 11:44       ` Simon Josefsson [this message]
2002-09-24 16:59         ` Micha Wiedenmann
2002-09-24 20:42           ` Simon Josefsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=iluvg4v8vdv.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).