From googly.negotiator862 at aceecat.org Wed Feb 4 18:57:19 2026 From: googly.negotiator862 at aceecat.org (googly.negotiator862 at aceecat.org) Date: Wed, 4 Feb 2026 10:57:19 -0800 Subject: Envelope-from pain Message-ID: 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="MY-REAL-NAME at aceecat.org"' 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 From mutt at raf.org Wed Feb 4 20:49:03 2026 From: mutt at raf.org (raf) Date: Thu, 5 Feb 2026 07:49:03 +1100 Subject: Envelope-from pain In-Reply-To: References: Message-ID: On Wed, Feb 04, 2026 at 10:57:19AM -0800, googly.negotiator862 at aceecat.org wrote: > 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="MY-REAL-NAME at aceecat.org"' > > 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 The sendmail command takes an -f option for that. Perhaps a hook or macro that sets mutt's sendmail setting would help. cheers, raf From mutt-users at veggiechinese.net Wed Feb 4 22:49:48 2026 From: mutt-users at veggiechinese.net (Will Yardley) Date: Wed, 4 Feb 2026 14:49:48 -0800 Subject: Envelope-from pain In-Reply-To: References: Message-ID: <20260204224948.GA36704@mail.veggiechinese.net> On Wed, Feb 04, 2026 at 10:57:19AM -0800, googly.negotiator862 at aceecat.org wrote: > So, how can I set envelope-from to something arbitrary with reasonable > ease? I would not consider manually executing ":set envelope-from=..." Does setting $envelope_from work for you? That, combined with some other settings, I think will do what you want, assuming your MTA is configured properly as well. Something like (based on my config): set realname="Your Name" set use_from set from="foo at example.com" send-hook . 'unmy_hdr From:' set reverse_name alternates '(.*@example\.com|(othername|postmaster)@example\.net)' set envelope_from # Note: $reverse_name is usually sufficient for _replying_ with the # address a message was sent to in most cases if it matches the regex in # $alternates, but you can also use send-hooks for things like sending # new mail to a list or a specific recipient. send-hook '~C ^mutt-users at mutt\.org$' 'my_hdr From: Your Name ' w From plist at posteo.eu Fri Feb 6 09:55:12 2026 From: plist at posteo.eu (Piet) Date: Fri, 06 Feb 2026 09:55:12 +0000 Subject: Set a realname in a macro Message-ID: <9a5c2033ee4f2bfa2cfe3473f01ea9ea9b95d2b1.camel@posteo.eu> Dear Mutt-Users, to switch between own email-addresses to send e-mail via mutt/msmtp, I use the macro: macro compose .c foo at bar.de The sent mail does not have a real name of the sender address in the header. Is it possible to set a realname in this macro? Thank you! Kind regards Piet