Hi Marius,
> > Can you tell me why this happens?
>
> I think I can. I've set $sendmail to a wrapper script and noticed, that
> the "-f user@host" is not added when bouncing a message, despite
> $envelope_from being turned on.
Exactly. In my last email to the list I also mentioned that I am convinced
that the problem lies in mutt *not* changing the "From " field in bounced
messages although $envelope_from is set...
> > If this is the problem, how can I overcome it?
>
> You can add -fyour@address to $sendmail variable or you can make your
> MTA do envelope masquerading.
I also thought about using some sort of address rewriting at MTA-level, but
having more than one email address at my ISP makes it rather complicated to
"teach" the MTA which of the addresses to use when doing the rewrite.
> These solutions are not perfect, as they
> override $envelope_from (I think... what would sendmail do if it got
> two -f options?), and sometimes you need to have your envelope from
> equal to the From: field.
I thought that solution *was* perfect :) ... Afterall, if you add "-f" to your
$sendmail there it is no longer necessary to set $envelope_from, right?,
because according to the manual "set envelope_from=yes" does precisely that:
"envelope_from:
(...)
When set, mutt will try to derive the message's envelope sender from the
"From:" header. Note that this option is passed to sendmail command using
the "-f" command line switch, so don't set this option if you are using that
switch in sendmail yourself(...)"
So by manually adding the "-f" switch to $sendmail you get all the
$envelope_from functionality, in addition to (working!) message bouncing.
But I just tested it and it seems to have a problem: "manually" doing the job
$envelope_from performs isn't easy if you wish to have different "From "
headers (based on "From:")...
I guess this problem was what you mean in the first place when you said that
this solution wasn't perfect... perhaps you were right :(
Thank you for your help,
Manuel
PS: Probably this is trivial to implement: I guess the team of developers
can easily make $envelope_from also assure that "From "=="From:" when the
user bounces a message... afterall, it already works flawlessly when
sending, replying and forwarding!