<<< Date Index >>>     <<< Thread Index >>>

mutt/2682: mutt should let me specify the Sender: header



>Number:         2682
>Notify-List:    jhawk@xxxxxxx
>Category:       mutt
>Synopsis:       mutt should let me specify the Sender: header
>Confidential:   no
>Severity:       normal
>Priority:       medium
>Responsible:    mutt-dev
>State:          open
>Keywords:       
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 11 05:34:53 +0100 2007
>Originator:     John Hawkinson
>Release:        1.5.12
>Organization:
MIT
>Environment:
>Description:
mutt should let me compose messages and specify a Sender: field. Instead, mutt 
silently drops the Sender: field that I add in.

For instance, RFC2822 gives us the sample where John's secretary Michael sends 
a message to Mary:

---
----
From: John Doe <jdoe@xxxxxxxxxxxxxxx>
Sender: Michael Jones <mjones@xxxxxxxxxxxxxxx>
To: Mary Smith <mary@xxxxxxxxxxx>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <1234@xxxxxxxxxxxxxxxxxxxxx>

This is a message just to say hello.
----

If I do try this in mutt, it lets me change from From: line to John, but drops 
my Sender: line. Thus, it looks to the recipient like the message actually came 
from John, with no clear indication that it really came from Michael.

It appears the problem is that mutt knows about the Sender: header sufficiently 
well to treat it specially by incorporating it into the struct envelope, so 
that it is not treated as a user header, but does not know enough to write the 
header out when it writes out headers.

Some might argue that it's not the job of the the MUA to specify the Sender: 
header and prefer the MTA do so. I disagree, because many MTAs don't, and I 
wish to customize my Sender: headers with explanatory text (e.g. a name) that 
would not be inserted by an MTA.

>How-To-Repeat:
In mutt, turn on header editing, compose a message, add a Sender: header, 
notice it disappears when you return to the composing menu, or if you go back 
to editing the message before ending it. Send the message. Observe the 
recipient does not have a Sender: header.
>Fix:
Attached is a patch to mutt_write_rfc822_header() (against 1.5.12) to write the 
Sender: header right after it writes the From: header.

I don't think this needs to be conditionalized on !privacy, but I am not 
certain.
>Add-To-Audit-Trail:

>Unformatted:
 ----gnatsweb-attachment----
 Content-Type: application/octet-stream; name="mutt-sender-patch"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename="mutt-sender-patch"
 
 LS0tIG11dHQtMS41LjEyL3NlbmRsaWIuYy5kaXN0CTIwMDYtMDYtMDggMDc6NTE6MTUuMDAwMDAw
 MDAwIC0wNDAwCisrKyBtdXR0LTEuNS4xMi9zZW5kbGliLmMJMjAwNy0wMS0xMCAyMzoyMDoyMi4w
 MDAwMDAwMDAgLTA1MDAKQEAgLTE1NTQsNiArMTU1NCwxMSBAQCBpbnQgbXV0dF93cml0ZV9yZmM4
 MjJfaGVhZGVyIChGSUxFICpmcCwgCiAgICAgZnByaW50ZiAoZnAsICJGcm9tOiAlc1xuIiwgYnVm
 ZmVyKTsKICAgfQogCisgIGlmIChlbnYtPnNlbmRlcikgeworICAgIGZwdXRzICgiU2VuZGVyOiAi
 LCBmcCk7CisgICAgbXV0dF93cml0ZV9hZGRyZXNzX2xpc3QoZW52LT5zZW5kZXIsIGZwLCA4LCAw
 KTsKKyAgfQorCiAgIGlmIChlbnYtPnRvKQogICB7CiAgICAgZnB1dHMgKCJUbzogIiwgZnApOwo=