I use opaque single purpose return addresses for much communication,
including this mailing list. For this setup to work I clearly need to
set the envelope from as well. Currently I do it with this trick in my
rc file:

  send-hook '~A' 'set envelope_from_address=$from'

but this only works if there is also a corresponding *specific* hook
for "set from=...".  Which is the case most of the time, such as when
posting to lists, or in fact sending to any "known" address. But not
always. One problematic situation is subscribing to a new mailing
list. This depends on the list management software, but ezmlm for
instance looks at the envelope-from of the subscription message and
not the From:.

I emphasized "specific" above because I also have

  send-hook '! ~Q' 'set from="[email protected]"'

and this in turn is needed because mutt / neomutt can't guess the
domain, which is different from the hostname.

So, how can I set envelope-from to something arbitrary with reasonable
ease? I would not consider manually executing ":set envelope-from=..."
once to be too hard, but I don't think it would work: firstly, I'm
afraid the first hook quoted above will override it while $from is
still set to the generic revelatory value, and secondly I'd have to
then execute it again to undo it.

Some of this may be rooted in my misunderstanding or insufficient
understanding how hooks work. If so please correct the
misunderstanding too, don't just propose a solution without
background. Thanks!

-- 
Ian

Reply via email to