On Wednesday, November 5 at 03:11 PM, quoth Thomas Parmelan:
Mutt doesn't store the envelope from in the saved copy of the message.Yes it does. I use mbox folders. The From separator usually uses the envelope sender. In fact, it really does for incoming messages...
Ahh, sorry, I was thinking of Maildirs.In any case, the problem you face here is that mboxes are not well defined (there's no official standard). Imagine moving a message from a Maildir into an mbox---what should be used to generate the From_ line?
Granted, mutt could probably work harder to preserve envelope information when working exclusively with mboxes, and you can submit an enhancement request to the mutt-dev folks.
That said, I don't think that relying on the From_ separator for useful information is a good idea. It's just too unreliable. The From_ line has no reliable format specification, so extracting information from it is, at best, a guessing game. With certain software combinations, you can get lucky and have a predictable format there, but... it's perfectly legitimate to use a separator line in your mbox that begins with "From an mbox generator!" or contains random ascii characters after the "From " prefix.
I suspect it can be useful also for postponed messages or messages created from a saved message (via <resend-message>)...
Doing so invites a lot of policy questions. Should $envelope_from be reset whenever you load up a postponed message, or should mutt temporarily use whatever was in that message and restore the previous $envelope_from after having sent it? How should mutt treat send-hooks that may use, redefine, or otherwise rely on the value of $envelope_from? Once you've loaded up a previously postponed message, if you then choose to change the envelope, should that change vanish after you've sent the message or be persistent? If the postponed message was stored in a Maildir or an MH folder or on an IMAP server, where there isn't a From_ separator to store the envelope, how should mutt generate the envelope for the outbound message? It's probably not a good idea to have mutt use different behavior based on what storage format it's using.
~Kyle --Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it.
-- Linus Torvalds
Attachment:
pgpBjkQObyLnn.pgp
Description: PGP signature