Gnus development mailing list
 help / color / mirror / Atom feed
* Envelope sender lost from sending after gnus-draft-edit-message
@ 2003-02-11 17:03 Drew Raines
  2003-02-22 21:00 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Drew Raines @ 2003-02-11 17:03 UTC (permalink / raw)


Begin composing a message to yourself in a group which doesn't fall
under the default posting style.  `C-c C-d' to save it as a draft.
Go to nndraft:drafts and `D e' the message.  `C-c C-c' to send it.

When gnus-draft-edit-message runs, the correct From: header is
displayed and preserved throughout the sending process.  However,
the resulting message's envelope sender (which I don't see until
that message appears in my inbox) has reverted to the address of
the default posting style.

This behavior isn't intuitive to me; is it correct?  Here's the
crux of my gnus-posting styles, in case I've somehow configured it
to exhibit this behavior.

  ;; posting styles
  (setq gnus-posting-styles
        '(
           (".*"
            (address "drew@poured.net"))
           ("mail.phg"
            (address "drew@phg.mc.vanderbilt.edu"))
           ("mail.list.misc.nlug"
            (address "drew-list-nlug@poured.net"))
           ("mail.list.misc.beowulf"
            (address "drew-list-beowulf@poured.net"))
           (message-this-is-news
            (address "drew@poured.net")
            ("Mail-Copies-To" "never"))
           ("gmane.*"
            (address "drew@poured.net")
            ("Gmane-From" "drew@poured.net"))
           ))

-Drew



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-02-11 17:03 Envelope sender lost from sending after gnus-draft-edit-message Drew Raines
@ 2003-02-22 21:00 ` Lars Magne Ingebrigtsen
  2003-02-23 21:14   ` Andrew A. Raines
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-02-22 21:00 UTC (permalink / raw)


Drew Raines <drew@poured.net> writes:

> When gnus-draft-edit-message runs, the correct From: header is
> displayed and preserved throughout the sending process.  However,
> the resulting message's envelope sender (which I don't see until
> that message appears in my inbox) has reverted to the address of
> the default posting style.

Hm...  I didn't even remember that Gnus could set the envelope address
(in any easy manner).  Well, the "-f" thing to sendmail, I guess...

Let's see...

			;; Always specify who from,
			;; since some systems have broken sendmails.
			;; But some systems are more broken with -f, so
			;; we'll let users override this.
			(if (null message-sendmail-f-is-evil)
			    (list "-f" (message-make-address)))

And I guess `address' sets stuff up so `(message-make-address)'
returns the right address for the envelope?

The reason this doesn't work is that `D e' (and stuff) from the
drafts group doesn't set up the posting style variables properly, I
think. 

I've now added a call to the posting style stuff after the right
newsgroup name has been set.  Could you check whether this fixes the
problem? 

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-02-22 21:00 ` Lars Magne Ingebrigtsen
@ 2003-02-23 21:14   ` Andrew A. Raines
  2003-02-23 21:35     ` Jesper Harder
  2003-02-24  7:03     ` Kai Großjohann
  0 siblings, 2 replies; 15+ messages in thread
From: Andrew A. Raines @ 2003-02-23 21:14 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@quimbies.gnus.org> writes:

> Drew Raines <drew@poured.net> writes:
>
>> When gnus-draft-edit-message runs, the correct From: header is
>> displayed and preserved throughout the sending process.
>> However, the resulting message's envelope sender (which I don't
>> see until that message appears in my inbox) has reverted to the
>> address of the default posting style.
>
> Hm...  I didn't even remember that Gnus could set the envelope
> address (in any easy manner).  Well, the "-f" thing to sendmail,
> I guess...

What's the difference sendmail-wise between hitting `C-c C-c' on a
newly composed messge and doing it after `D e'?

And it's not necessarily a g-d-e-m problem, either, because Gnus
behaves the same way when I do `D s' in nndraft:drafts without ever
editing the saved message.

[...]

> I've now added a call to the posting style stuff after the right
> newsgroup name has been set.  Could you check whether this fixes
> the problem?

It doesn't seem to have fixed it.  Messages not sent via an
original C-c C-c still have conflicting envelope from and header
From: information.

BTW, I've tried setting various methods of sending mail (SMTP,
sendmail, qmail-inject) and they all exhibit the same behavior with
regard to this problem.

I know this seems like a minor issue, but it causes a problem when
I've delayed or draft'ed a message to a closed mailing list that
checks the envelope sender (correctly, mind you) for
subscribedness.  Moderators everywhere are congregating against me.

Another issue I discovered with composing this message is that
a news draft cannot survive a restart of Gnus (or Emacs, I'm not
sure which because I just did both).  Gnus complained that it
couldn't find the newsgroup ``gnus.ding.''

-- 
Andrew A. Raines <drew@poured.net>



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-02-23 21:14   ` Andrew A. Raines
@ 2003-02-23 21:35     ` Jesper Harder
  2003-02-24  5:29       ` Andrew A. Raines
  2003-03-01 22:11       ` Andrew A. Raines
  2003-02-24  7:03     ` Kai Großjohann
  1 sibling, 2 replies; 15+ messages in thread
From: Jesper Harder @ 2003-02-23 21:35 UTC (permalink / raw)


"Andrew A. Raines" <drew@poured.net> writes:

> It doesn't seem to have fixed it.  Messages not sent via an
> original C-c C-c still have conflicting envelope from and header
> From: information.
>
> BTW, I've tried setting various methods of sending mail (SMTP,
> sendmail, qmail-inject) and they all exhibit the same behavior with
> regard to this problem.

I think the version of smtpmail.el/sendmail.el in Emacs CVS has a fix
for this problem.  With

    (setq mail-envelope-from 'header)

the envelope from is deduced from the From: header.



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-02-23 21:35     ` Jesper Harder
@ 2003-02-24  5:29       ` Andrew A. Raines
  2003-03-01 22:11       ` Andrew A. Raines
  1 sibling, 0 replies; 15+ messages in thread
From: Andrew A. Raines @ 2003-02-24  5:29 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> writes:

> "Andrew A. Raines" <drew@poured.net> writes:
>
>> It doesn't seem to have fixed it.  Messages not sent via an
>> original C-c C-c still have conflicting envelope from and header
>> From: information.
>>
>> BTW, I've tried setting various methods of sending mail (SMTP,
>> sendmail, qmail-inject) and they all exhibit the same behavior
>> with regard to this problem.
>
> I think the version of smtpmail.el/sendmail.el in Emacs CVS has a
> fix for this problem.  With
>
>     (setq mail-envelope-from 'header)
>
> the envelope from is deduced from the From: header.

While I appreciate the suggestion, it doesn't seem to be the
``correct'' solution.  If Gnus acts a certain way (intuitively,
IMO) when a message is sent ephemerally, it seems like it should at
least act the same when one is saved, or delayed, for a time as a
draft.

I can accept that Gnus possibly isn't at fault here, but I think
the behavior should be consistent whether a C-c C-d or C-c C-j is
involved or not.

-- 
Andrew A. Raines <drew@poured.net>



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-02-23 21:14   ` Andrew A. Raines
  2003-02-23 21:35     ` Jesper Harder
@ 2003-02-24  7:03     ` Kai Großjohann
  2003-02-24 16:58       ` Andrew A. Raines
  1 sibling, 1 reply; 15+ messages in thread
From: Kai Großjohann @ 2003-02-24  7:03 UTC (permalink / raw)


"Andrew A. Raines" <drew@poured.net> writes:

> What's the difference sendmail-wise between hitting `C-c C-c' on a
> newly composed messge and doing it after `D e'?

Gnus (sometimes) passes "-f foo" as an arg to sendmail, where the foo
comes from a (buffer-local?) variable.  If you store the message in
the drafts group, then edit it from there, the variable might have
another value altogether, especially if the original value was
buffer-local to begin with.

Maybe it would work to remember all buffer-local variables when
saving a draft, so that they can be restored on `D e'.

To fix this particular problem, only the value for the -f arg needs
to be remembered, though.

(From a later message I gather that you think that Gnus has a bug
there.  I agree.  I don't think that Jesper wanted to convince you
there is no bug, he just wanted to explain.)
-- 
A preposition is not a good thing to end a sentence with.



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-02-24  7:03     ` Kai Großjohann
@ 2003-02-24 16:58       ` Andrew A. Raines
  2003-02-24 19:09         ` Andrew A. Raines
  2003-02-24 19:42         ` Kai Großjohann
  0 siblings, 2 replies; 15+ messages in thread
From: Andrew A. Raines @ 2003-02-24 16:58 UTC (permalink / raw)


kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> "Andrew A. Raines" <drew@poured.net> writes:
>
>> What's the difference sendmail-wise between hitting `C-c C-c' on
>> a newly composed messge and doing it after `D e'?
>
> Gnus (sometimes) passes "-f foo" as an arg to sendmail, where the
> foo comes from a (buffer-local?) variable.

OK, this makes sense.  But why does Gnus pass -f sometimes?
Shouldn't the sendmail binary (or, in this case, qmail's sendmail
compatibility wrapper) do the right thing with the envelope?  I
know qmail-inject does.

> To fix this particular problem, only the value for the -f arg needs
> to be remembered, though.

Perhaps no -f is needed in the first place?

-- 
Andrew A. Raines <drew@poured.net>



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-02-24 16:58       ` Andrew A. Raines
@ 2003-02-24 19:09         ` Andrew A. Raines
  2003-02-24 19:42         ` Kai Großjohann
  1 sibling, 0 replies; 15+ messages in thread
From: Andrew A. Raines @ 2003-02-24 19:09 UTC (permalink / raw)


"Andrew A. Raines" <drew@poured.net> writes:

> Shouldn't the sendmail binary (or, in this case, qmail's sendmail
> compatibility wrapper) do the right thing with the envelope?  I
> know qmail-inject does.

Apparently the ``right thing'' with the envelope is using
<username@host>, because that's what qmail-inject did.  It didn't
steal it from the From: header.

I guess I've never not used -f.  Forget my last message.



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-02-24 16:58       ` Andrew A. Raines
  2003-02-24 19:09         ` Andrew A. Raines
@ 2003-02-24 19:42         ` Kai Großjohann
  1 sibling, 0 replies; 15+ messages in thread
From: Kai Großjohann @ 2003-02-24 19:42 UTC (permalink / raw)


"Andrew A. Raines" <drew@poured.net> writes:

> kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:
>
>> "Andrew A. Raines" <drew@poured.net> writes:
>>
>>> What's the difference sendmail-wise between hitting `C-c C-c' on
>>> a newly composed messge and doing it after `D e'?
>>
>> Gnus (sometimes) passes "-f foo" as an arg to sendmail, where the
>> foo comes from a (buffer-local?) variable.
>
> OK, this makes sense.  But why does Gnus pass -f sometimes?

Because sendmail would otherwise build an envelope from from the user
name and the host name.  That's not always a meaningful email
address.
-- 
A preposition is not a good thing to end a sentence with.



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-02-23 21:35     ` Jesper Harder
  2003-02-24  5:29       ` Andrew A. Raines
@ 2003-03-01 22:11       ` Andrew A. Raines
  1 sibling, 0 replies; 15+ messages in thread
From: Andrew A. Raines @ 2003-03-01 22:11 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> writes:

> "Andrew A. Raines" <drew@poured.net> writes:
>
>> It doesn't seem to have fixed it.  Messages not sent via an
>> original C-c C-c still have conflicting envelope from and header
>> From: information.

[...]

> I think the version of smtpmail.el/sendmail.el in Emacs CVS has a
> fix for this problem.  With
>
>     (setq mail-envelope-from 'header)
>
> the envelope from is deduced from the From: header.

Now I'm having a problem with the latest Oort not setting the
envelope to anything other than username@host, no matter what
variables I frob.  It's not even setting it to user-mail-address
(which is different from username@host in my setup).

I notice, Jesper, that you added a variable and function,
message-sendmail-envelope-from, which, when set to 'header, will
create the envelope using the From: address.  For some reason,
though, it doesn't work me:

,----[ C-h v message-sendmail-envelope-from RET ]
| `message-sendmail-envelope-from' is a variable declared in Lisp.
|   -- loaded from "message"
| 
| Value: header
| 
| Documentation:
| *Envelope-from when sending mail with sendmail.
| If this is nil, use `user-mail-address'.  If it is the symbol
| `header', use the From: header of the message.
`----

Are you still working on this implementation?



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-03-02  6:24     ` Andrew A. Raines
@ 2003-03-02 16:47       ` Jesper Harder
  0 siblings, 0 replies; 15+ messages in thread
From: Jesper Harder @ 2003-03-02 16:47 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

"Andrew A. Raines" <drew@poured.net> writes:

> How did earlier Gnuses handle this issue?  

Basically the same way as now: It passes the envelope sender to sendmail
with '-f' on the command line.

If `message-sendmail-envelope-from' is nil (the default), nothing should
have changed -- it'll use `message-make-address' in the envelope.

> It seems like this only started recently.  

I don't see how `message-sendmail-envelope-from' could make anything
different with the default setting.  But you could try this patch and
see if it changes anything:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: message.el.diff --]
[-- Type: text/x-patch, Size: 473 bytes --]

--- gnus/lisp/message.el	Sat Mar  1 15:28:48 2003
+++ message.el	Sun Mar  2 17:28:12 2003
@@ -3559,7 +3559,7 @@
 			;; But some systems are more broken with -f, so
 			;; we'll let users override this.
 			(if (null message-sendmail-f-is-evil)
-			    (list "-f" (message-sendmail-envelope-from)))
+			    (list "-f" (message-make-address)))
 			;; These mean "report errors by mail"
 			;; and "deliver in background".
 			(if (null message-interactive) '("-oem" "-odb"))

[-- Attachment #3: Type: text/plain, Size: 346 bytes --]


Hmm, maybe your sendmail just doesn't like the '-f' option -- the
comment in message.el suggests that this is sometimes the case:

;; Always specify who from,
;; since some systems have broken sendmails.
;; But some systems are more broken with -f, so
;; we'll let users override this.

Does '-f' work if you use sendmail from the command line?

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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-03-02  0:50   ` Jesper Harder
@ 2003-03-02  6:24     ` Andrew A. Raines
  2003-03-02 16:47       ` Jesper Harder
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew A. Raines @ 2003-03-02  6:24 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> writes:

> OK, so this suggests that `message-sendmail-envelope-from' is
> working correctly.
>
> I wonder what is wrong in your case.  What's your value of
> `message-send-mail-function'?  The option only applies if it is
> `message-send-mail-with-sendmail'.

Darn.  I wish I had it set to something else, but I don't.

,----[ C-h v message-send-mail-function RET ]
| `message-send-mail-function' is a variable declared in Lisp.
|   -- loaded from "message"
| 
| Value: message-send-mail-with-sendmail
[...]
`----

Bummer, I don't know enough elisp to diagnose what's wrong.

How did earlier Gnuses handle this issue?  It seems like this only
started recently.  Surely I'm not the first person expecting the
envelope to match the header contents.

-- 
http://poured.net/drew/dot-gnus.txt




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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-03-02  0:25 ` Andrew A. Raines
@ 2003-03-02  0:50   ` Jesper Harder
  2003-03-02  6:24     ` Andrew A. Raines
  0 siblings, 1 reply; 15+ messages in thread
From: Jesper Harder @ 2003-03-02  0:50 UTC (permalink / raw)


"Andrew A. Raines" <drew@poured.net> writes:

> Jesper Harder <harder@myrealbox.com> writes:
>
>> It's supposed to be working :-) What do you get when you eval:
>>
>>      (let (message-sendmail-envelope-from)
>>        (message-sendmail-envelope-from))
>
> This returns what I have set for user-mail-address in .gnus.el.
>
>>      (let ((message-sendmail-envelope-from 'header))
>>        (with-temp-buffer
>>          (insert "From: J Random Hacker <jrh@example.com>")
>>          (message-sendmail-envelope-from)))
>
> This returns `jrh@example.com'.

OK, so this suggests that `message-sendmail-envelope-from' is working
correctly.

I wonder what is wrong in your case.  What's your value of
`message-send-mail-function'?  The option only applies if it is
`message-send-mail-with-sendmail'.

> I just threw those into *scratch* and C-x C-e'd each of them.  Is
> that what you meant?

Yes.



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
  2003-03-01 23:46 Jesper Harder
@ 2003-03-02  0:25 ` Andrew A. Raines
  2003-03-02  0:50   ` Jesper Harder
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew A. Raines @ 2003-03-02  0:25 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> writes:

> "Andrew A. Raines" <drew@poured.net> writes:
>
>> I notice, Jesper, that you added a variable and function,
>> message-sendmail-envelope-from, which, when set to 'header, will
>> create the envelope using the From: address.  For some reason,
>> though, it doesn't work me:

[...]

> It's supposed to be working :-) What do you get when you eval:
>
>      (let (message-sendmail-envelope-from)
>        (message-sendmail-envelope-from))

This returns what I have set for user-mail-address in .gnus.el.

>      (let ((message-sendmail-envelope-from 'header))
>        (with-temp-buffer
>          (insert "From: J Random Hacker <jrh@example.com>")
>          (message-sendmail-envelope-from)))

This returns `jrh@example.com'.

I just threw those into *scratch* and C-x C-e'd each of them.  Is
that what you meant?  I'm not sure if I was supposed to see more
than the one-liners on the message bar.



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

* Re: Envelope sender lost from sending after gnus-draft-edit-message
@ 2003-03-01 23:46 Jesper Harder
  2003-03-02  0:25 ` Andrew A. Raines
  0 siblings, 1 reply; 15+ messages in thread
From: Jesper Harder @ 2003-03-01 23:46 UTC (permalink / raw)


"Andrew A. Raines" <drew@poured.net> writes:

> I notice, Jesper, that you added a variable and function,
> message-sendmail-envelope-from, which, when set to 'header, will
> create the envelope using the From: address.  For some reason,
> though, it doesn't work me:
>
> ,----[ C-h v message-sendmail-envelope-from RET ]
>
> Are you still working on this implementation?

It's supposed to be working :-) What do you get when you eval:

     (let (message-sendmail-envelope-from)
       (message-sendmail-envelope-from))

and

     (let ((message-sendmail-envelope-from 'header))
       (with-temp-buffer
         (insert "From: J Random Hacker <jrh@example.com>")
         (message-sendmail-envelope-from)))
  



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

end of thread, other threads:[~2003-03-02 16:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-11 17:03 Envelope sender lost from sending after gnus-draft-edit-message Drew Raines
2003-02-22 21:00 ` Lars Magne Ingebrigtsen
2003-02-23 21:14   ` Andrew A. Raines
2003-02-23 21:35     ` Jesper Harder
2003-02-24  5:29       ` Andrew A. Raines
2003-03-01 22:11       ` Andrew A. Raines
2003-02-24  7:03     ` Kai Großjohann
2003-02-24 16:58       ` Andrew A. Raines
2003-02-24 19:09         ` Andrew A. Raines
2003-02-24 19:42         ` Kai Großjohann
2003-03-01 23:46 Jesper Harder
2003-03-02  0:25 ` Andrew A. Raines
2003-03-02  0:50   ` Jesper Harder
2003-03-02  6:24     ` Andrew A. Raines
2003-03-02 16:47       ` Jesper Harder

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