Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: smtpmail.el, user-mail-address and posting styles
       [not found] <cbgilb$d95$1@news1.ewetel.de>
@ 2004-06-25 11:02 ` Simon Josefsson
  0 siblings, 0 replies; only message in thread
From: Simon Josefsson @ 2004-06-25 11:02 UTC (permalink / raw)


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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-25 11:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cbgilb$d95$1@news1.ewetel.de>
2004-06-25 11:02 ` smtpmail.el, user-mail-address and posting styles Simon Josefsson

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).