Gnus development mailing list
 help / color / mirror / Atom feed
* incorrect sender
@ 1999-05-04 22:18 David Hedbor
  1999-05-05  1:38 ` Stainless Steel Rat
  0 siblings, 1 reply; 11+ messages in thread
From: David Hedbor @ 1999-05-04 22:18 UTC (permalink / raw)


When I send mails with Gnus nowadays the sender is always
webmaster@animearchive.org (as demonstrated below). This is incorrect
since I use posting styles to set different from addresses. How can I
fix this?

MAIL FROM: <webmaster@animearchive.org>
250 <webmaster@animearchive.org>... Sender ok
RCPT TO: <licq@ctr.videotron.com>
250 <licq@ctr.videotron.com>... Recipient ok
DATA  (irrelevant headers and body snipped)
354 Enter mail, end with "." on a line by itself
To: licq@ctr.videotron.com
Sender: neotron@nyarlathotep.hedbor.org
From: David Hedbor <david@hedbor.org>
[..]
250 PAA00759 Message accepted for delivery
QUIT
221 pokey.animearchive.org closing connection

As you can see Sender is correct, and so is the From header. However
the MAIL FROM value is incorrect.


-- 
[ Below is a random fortune, which is unrelated to the above message. ]
Johnson's First Law:
	When any mechanical contrivance fails, it will do so at the
	most inconvenient possible time.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-04 22:18 incorrect sender David Hedbor
@ 1999-05-05  1:38 ` Stainless Steel Rat
  1999-05-05  3:42   ` David Hedbor
  0 siblings, 1 reply; 11+ messages in thread
From: Stainless Steel Rat @ 1999-05-05  1:38 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* David Hedbor <david@hedbor.org>  on Tue, 04 May 1999
| MAIL FROM: <webmaster@animearchive.org>
[...]
| As you can see Sender is correct, and so is the From header. However
| the MAIL FROM value is incorrect.

Two points:

First, this traffic is not generated by Gnus (if you got that from a
buffer, you are probably using smtpmail).  There is no way to make Gnus do
what you are asking because Gnus is not involved with the transaction.  It
has already washed its hands (metaphorically speaking) of the message by
that point.

Second, while the value might be considered inappropriate, it is correct
(canonical).  This is what is supposed to be there, specifically because
you are using non-canonical mailbox information in your RFC 822 headers.
Changing it would be `illegal' (cf RFC 821: SMTP, and its descendants).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3L6EAgl+vIlSVSNkRArOpAKCmi38PSXaksPy4WqhtnLd2EZEhGACg90EY
ypdJFbctSxxSq9zvNqG3/R8=
=7ecl
-----END PGP SIGNATURE-----

-- 
Rat <ratinox@peorth.gweep.net>    \ Caution: Happy Fun Ball may suddenly
Minion of Nathan - Nathan says Hi! \ accelerate to dangerous speeds.
PGP Key: at a key server near you!  \ 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-05  1:38 ` Stainless Steel Rat
@ 1999-05-05  3:42   ` David Hedbor
  1999-05-05 10:17     ` Robert Bihlmeyer
  1999-05-05 16:01     ` Stainless Steel Rat
  0 siblings, 2 replies; 11+ messages in thread
From: David Hedbor @ 1999-05-05  3:42 UTC (permalink / raw)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> * David Hedbor <david@hedbor.org>  on Tue, 04 May 1999
> | MAIL FROM: <webmaster@animearchive.org>
> [...]
> | As you can see Sender is correct, and so is the From header. However
> | the MAIL FROM value is incorrect.
> 
> Two points:
> 
> First, this traffic is not generated by Gnus (if you got that from a
> buffer, you are probably using smtpmail).  There is no way to make Gnus do
> what you are asking because Gnus is not involved with the transaction.  It
> has already washed its hands (metaphorically speaking) of the message by
> that point.

Ok. Guess the problem lies in the value of user-mail-address which is
webmaster@animearchive.org. Now when I think about it, I realize I had 
this fixed until I upgraded to pgnus. using this:

(defun neotron-change-address ()
  (interactive)
  (let* ((head (message-fetch-field "From")))
    (setq user-mail-address head)
    (let (email (message-user-mail-address))
      (setq user-mail-address email))))

(add-hook 'message-send-hook 'neotron-change-address)

That doesn't seem to work anymore. In any case the problem remains -
when using posting styles Gnus doesn't supply the mail sending agent
with a correct sender, which in this case would be setting
user-mail-address to the correct value.
 
> Second, while the value might be considered inappropriate, it is correct
> (canonical).  This is what is supposed to be there, specifically because
> you are using non-canonical mailbox information in your RFC 822 headers.
> Changing it would be `illegal' (cf RFC 821: SMTP, and its
> descendants).

Why would it be the correct sender? I am not sending it as
webmaster@anime, so why on earth would that be the correct one? I
don't understand what you're talking about, to be honest. It's the
wrong address.

-- 
[ Below is a random fortune, which is unrelated to the above message. ]
Waste not fresh tears over old griefs.
		-- Euripides



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-05  3:42   ` David Hedbor
@ 1999-05-05 10:17     ` Robert Bihlmeyer
  1999-05-05 16:01     ` Stainless Steel Rat
  1 sibling, 0 replies; 11+ messages in thread
From: Robert Bihlmeyer @ 1999-05-05 10:17 UTC (permalink / raw)


hi,

>>>>> On 04 May 1999 20:42:42 -0700
>>>>> David Hedbor <david@hedbor.org> said:

 David> Why would it be the correct sender? I am not sending it as
 David> webmaster@anime, so why on earth would that be the correct
 David> one? I don't understand what you're talking about, to be
 David> honest. It's the wrong address.

Are you running your emacs as user webmaster on machine anime?

	Robbe

-- 
Robert Bihlmeyer	reads: Deutsch, English, MIME, Latin-1, NO SPAM!
<robbe@orcus.priv.at>	<http://stud2.tuwien.ac.at/~e9426626/sig.html>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-05  3:42   ` David Hedbor
  1999-05-05 10:17     ` Robert Bihlmeyer
@ 1999-05-05 16:01     ` Stainless Steel Rat
  1999-05-05 18:42       ` Jeff Senn
  1 sibling, 1 reply; 11+ messages in thread
From: Stainless Steel Rat @ 1999-05-05 16:01 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* David Hedbor <david@hedbor.org>  on Tue, 04 May 1999
| Why would it be the correct sender? I am not sending it as
| webmaster@anime, so why on earth would that be the correct one? I
| don't understand what you're talking about, to be honest. It's the
| wrong address.

If you are logged into the machine with the canonical name 'anime.org' with
login 'webmaster', then your canonical mailbox is 'webmaster@anime.org'.
This is what is inserted in the envelope (MAIL FROM).  It only seems wrong
becuase you don't understand the complexity of mail handling.

Anyway, if it is invalid, your site's MTA should be configured to rewrite
outgoing information, either through masquerading or genericstable.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3MGs9gl+vIlSVSNkRAl2wAKDTcktjKXyXR0AlMrxdi4sDuAkA4gCfcCFd
lKfW2wZpW2fI3x9anh4yGuA=
=lRiV
-----END PGP SIGNATURE-----

-- 
Rat <ratinox@peorth.gweep.net>    \ If Happy Fun Ball begins to smoke, get
Minion of Nathan - Nathan says Hi! \ away immediately. Seek shelter and cover
PGP Key: at a key server near you!  \ head.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-05 16:01     ` Stainless Steel Rat
@ 1999-05-05 18:42       ` Jeff Senn
  1999-05-05 19:18         ` David Hedbor
  1999-05-05 19:47         ` Stainless Steel Rat
  0 siblings, 2 replies; 11+ messages in thread
From: Jeff Senn @ 1999-05-05 18:42 UTC (permalink / raw)




Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> * David Hedbor <david@hedbor.org>  on Tue, 04 May 1999
> | Why would it be the correct sender? I am not sending it as
> | webmaster@anime, so why on earth would that be the correct one? I
> | don't understand what you're talking about, to be honest. It's the
> | wrong address.
> 
> If you are logged into the machine with the canonical name 'anime.org' with
> login 'webmaster', then your canonical mailbox is 'webmaster@anime.org'.
> This is what is inserted in the envelope (MAIL FROM).  It only seems wrong
> becuase you don't understand the complexity of mail handling.

As an aside -- I noticed the same problem and (although I didn't look
at it in depth) if I use a literal "From" field in my posting style
rather than the name/address stuff it seems to exhibit the correct (or
should I say "desired") behaviour.

e.g. do this:

(setq gnus-posting-styles
   ...
	 ("From" "Jeff Senn <senn@maya.com>")
   ...

rather than:

(setq gnus-posting-styles
   ...
	 (name "Jeff Senn")
	 (address "senn@maya.com")
   ...


-- 
-Jas
-----------------------------------------------------------  / / |  / \ / /|
Jeff Senn          412-488-2900 voice    MAYA Design Group  /|/| |-/ o | /-| 
Chief Technologist 412-488-2940 fax   2100 Wharton Street  / | | |/    |/  |
senn@maya.com                       Pittsburgh, PA 15203   Taming Complexity
                                                          http://www.maya.com/



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-05 18:42       ` Jeff Senn
@ 1999-05-05 19:18         ` David Hedbor
  1999-05-05 19:47         ` Stainless Steel Rat
  1 sibling, 0 replies; 11+ messages in thread
From: David Hedbor @ 1999-05-05 19:18 UTC (permalink / raw)


Jeff Senn <senn@maya.com> writes:

> As an aside -- I noticed the same problem and (although I didn't look
> at it in depth) if I use a literal "From" field in my posting style
> rather than the name/address stuff it seems to exhibit the correct (or
> should I say "desired") behaviour.
> 
> e.g. do this:
> 
> (setq gnus-posting-styles
>    ...
> 	 ("From" "Jeff Senn <senn@maya.com>")
>    ...
> 
> rather than:
> 
> (setq gnus-posting-styles
>    ...
> 	 (name "Jeff Senn")
> 	 (address "senn@maya.com")
>    ...
> 

I do this already and it doesn't seem to work.


-- 
[ Below is a random fortune, which is unrelated to the above message. ]
And then there was the lawyer that stepped in cow manure and thought
he was melting...



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-05 18:42       ` Jeff Senn
  1999-05-05 19:18         ` David Hedbor
@ 1999-05-05 19:47         ` Stainless Steel Rat
  1999-05-05 20:11           ` David Hedbor
  1999-05-07 12:48           ` Jeff Senn
  1 sibling, 2 replies; 11+ messages in thread
From: Stainless Steel Rat @ 1999-05-05 19:47 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Jeff Senn <senn@maya.com>  on Wed, 05 May 1999
| As an aside -- I noticed the same problem and (although I didn't look
| at it in depth)

It is a different problem.  David is complaining about RFC 821 (SMTP)
envelope data, not RFC 822 headers.  As Gnus has no control over envelopes,
there is nothing Gnus can do about it.  This is the purview of the local
MTA or smtpmail, whichever David happens to use.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3MKBmgl+vIlSVSNkRAjP0AKC1a0ZgL58Sl7FwMQZ87fXke12akgCguMx3
1PHY7o+PUhaknpx3fCwaaeI=
=Ezj6
-----END PGP SIGNATURE-----

-- 
Rat <ratinox@peorth.gweep.net>    \ Happy Fun Ball may stick to certain types
Minion of Nathan - Nathan says Hi! \ of skin.
PGP Key: at a key server near you!  \ 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-05 19:47         ` Stainless Steel Rat
@ 1999-05-05 20:11           ` David Hedbor
  1999-05-05 20:34             ` Stainless Steel Rat
  1999-05-07 12:48           ` Jeff Senn
  1 sibling, 1 reply; 11+ messages in thread
From: David Hedbor @ 1999-05-05 20:11 UTC (permalink / raw)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> * Jeff Senn <senn@maya.com>  on Wed, 05 May 1999
> | As an aside -- I noticed the same problem and (although I didn't look
> | at it in depth)
> 
> It is a different problem.  David is complaining about RFC 821 (SMTP)
> envelope data, not RFC 822 headers.  As Gnus has no control over envelopes,
> there is nothing Gnus can do about it.  This is the purview of the local
> MTA or smtpmail, whichever David happens to use.

Since I am using smtpmail which gets that data from user-mail-address, 
it would be safe to assume that it would be the right thing for Gnus
to change the value of that variable, ne? 

As it turns out, it seems like Gnus already does to this. The variable
is however made buffer local to the message buffer, so it isn't used
when sending mails. 

I "fixed" my problem by setting the global version of that variable to 
neotron@nyarlathotep.hedbor.org. 

-- 
[ Below is a random fortune, which is unrelated to the above message. ]
"We don't care.  We don't have to.  We're the Phone Company."



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-05 20:11           ` David Hedbor
@ 1999-05-05 20:34             ` Stainless Steel Rat
  0 siblings, 0 replies; 11+ messages in thread
From: Stainless Steel Rat @ 1999-05-05 20:34 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* David Hedbor <david@hedbor.org>  on Wed, 05 May 1999
| I "fixed" my problem by setting the global version of that variable to
| neotron@nyarlathotep.hedbor.org.

Hmmm... skim through smtpmail.el....

Interesting.  It changed since the last time I looked at it.  smtpmail now
uses user-mail-address instead of catenating (user-login-name) +
(smtpmail-fqdn), which is what sendmail does.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3MKtEgl+vIlSVSNkRAjJsAKCm75T1wshOU0TdbkPoijzYgG13xACg4uL4
BQF4052ixv3iej9GQrluhFQ=
=7Owe
-----END PGP SIGNATURE-----

-- 
Rat <ratinox@peorth.gweep.net>    \ Warning: pregnant women, the elderly, and
Minion of Nathan - Nathan says Hi! \ children under 10 should avoid prolonged
PGP Key: at a key server near you!  \ exposure to Happy Fun Ball.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: incorrect sender
  1999-05-05 19:47         ` Stainless Steel Rat
  1999-05-05 20:11           ` David Hedbor
@ 1999-05-07 12:48           ` Jeff Senn
  1 sibling, 0 replies; 11+ messages in thread
From: Jeff Senn @ 1999-05-07 12:48 UTC (permalink / raw)



Stainless Steel Rat <ratinox@peorth.gweep.net> writes:
> It is a different problem.  David is complaining about RFC 821 (SMTP)
> envelope data, not RFC 822 headers.  As Gnus has no control over envelopes,
> there is nothing Gnus can do about it.  This is the purview of the local
> MTA or smtpmail, whichever David happens to use.

Yes, I understood that -- of course I missed the part of my .emacs where
I "outsmart" smtpmail [as well as myself apparently... :-) ]

-----snip-----------
;;These functions can be used with the following hooks:
;    (add-hook 'message-send-hook 'jas-mail-address-from-buffer)
;    (add-hook 'message-sent-hook 'jas-mail-address-restore)
;; to override the envelope address (which is taken from user-mail-address)
;; with whatever is specified in the From: field of the message buffer.
;; This is particularly useful to forge mail :) or if you orginate mail from
;; different accounts or folders.
;; (limitation: From: address must be enclosed by <>)
(defun jas-mail-address-from-buffer ()
  "reset user-mail-address given From in buffer"
  (save-excursion
    (goto-char (point-min))
    (setq jas-user-mail-address user-mail-address))
    (let ((delimline (re-search-forward "\n\n" (point-max) 1)))
      (goto-char (point-min))
      (let* ((start-fr (re-search-forward "^From:" delimline t))
	    (st-br    (and start-fr (re-search-forward "<" delimline t)))
	    (end-br   (and st-br (re-search-forward ">" delimline t))))
	(if end-br 
	    (setq user-mail-address (buffer-substring st-br (- end-br 1)))))))
(defun jas-mail-address-restore ()
  "reset old user-mail-address"
  (setq user-mail-address jas-user-mail-address))

(require 'message)
(add-hook 'message-send-hook 'jas-mail-address-from-buffer)
(add-hook 'message-sent-hook 'jas-mail-address-restore)

-----snip-----------

-- 
-Jas
-----------------------------------------------------------  / / |  / \ / /|
Jeff Senn          412-488-2900 voice    MAYA Design Group  /|/| |-/ o | /-| 
Chief Technologist 412-488-2940 fax   2100 Wharton Street  / | | |/    |/  |
senn@maya.com                       Pittsburgh, PA 15203   Taming Complexity
                                                          http://www.maya.com/



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1999-05-07 12:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-04 22:18 incorrect sender David Hedbor
1999-05-05  1:38 ` Stainless Steel Rat
1999-05-05  3:42   ` David Hedbor
1999-05-05 10:17     ` Robert Bihlmeyer
1999-05-05 16:01     ` Stainless Steel Rat
1999-05-05 18:42       ` Jeff Senn
1999-05-05 19:18         ` David Hedbor
1999-05-05 19:47         ` Stainless Steel Rat
1999-05-05 20:11           ` David Hedbor
1999-05-05 20:34             ` Stainless Steel Rat
1999-05-07 12:48           ` Jeff Senn

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