Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: smtpmail.el, user-mail-address and posting styles
Date: Fri, 25 Jun 2004 13:02:10 +0200	[thread overview]
Message-ID: <ilu3c4jx5n1.fsf@latte.josefsson.org> (raw)
In-Reply-To: <cbgilb$d95$1@news1.ewetel.de>

Matthias Riese <mri.news200406@rieseIT.de> 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.


           reply	other threads:[~2004-06-25 11:02 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <cbgilb$d95$1@news1.ewetel.de>]

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=ilu3c4jx5n1.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    /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).