Re: Automatically setting the from: header based on to:
- To: mutt-users@xxxxxxxx
- Subject: Re: Automatically setting the from: header based on to:
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Fri, 9 May 2008 16:48:04 -0500
- Cc: Plead Insanity <jay-mutt@xxxxxxxxxxxx>
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=toTzHOXZQpl+FU3I8V5ZNef ZGFw=; b=M7OxrmherEysZBmpy5tMg+pe/lh75imdN5I3kK1AFbSExE2Wmrr+KxE ec6lqBw4AwIVUPx1H2auwGnL/ABjnPnPQK0vBqLckQvmgDRrnxQrIRPrWb3LqZiT HvDGihDS7qkK3CdGAUmKutsxiycYd4THAJLRY8wVjD3wuJ/fnZrM=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=OVONolxrJIICqNKF1VuSeHrszLuBALqtssQ0N/aHA8Zm74d3lscB10ZiQ5SB+P6fHqXm60Oo+1kVIj4t6J1fQDNqs7mlFjNaaAdAEg9oCXMJ0dqkhABOf1hsKwk/+EnyvjuWaPhQblGvLRfzw/UXXV6dIKa58pdISoMfIhKvZrg=; h=Received:Received:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20080509212158.GA95699@xxxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx, Plead Insanity <jay-mutt@xxxxxxxxxxxx>
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20080509212158.GA95699@xxxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.17 (2008-04-09)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday, May 9 at 04:21 PM, quoth Plead Insanity:
>Hi, I have many different email aliases all going into one account. I
>have been trying to figure out a way to get mutt to recognize the To:
>header and compose massages with the person the email address was sent
>*to* as the *from* header.
You want to re-read the $reverse_name documentation.
>I tried out the set reverse_name, and set envelope_from options, but
>they seemed to have no effect.
Here's the critical part of the $reverse_name documentation that you
missed:
If this variable is set, the default From: line of the reply
messages is built using the address where you received the
messages you are replying to if that address matches your
alternates.
Translation: you need to *also* set up your alternates. If you think
about it, it makes sense: mutt needs to know which addresses are
*you*, and which ones are not (you don't want it to do something like
*always* use the To header as the From header---mailing lists, CC's,
forwards, all sorts of things would break).
To set up alternates, you would add something like this to your muttrc
(don't use this just yet - I'll explain in a moment):
set reverse_name
alternates jay-mutt@xxxxxxxxxxxx alias1@xxxxxxxxxx
alternates alias2@xxxxxxxxxx
Now, keep in mind, the "alternates" command takes *patterns*, and you
generally want to be strict with those. So, to start with, that should
be:
set reverse_name
alternates '^jay-mutt@xxxxxxxxxxxx$' '^alias1@xxxxxxxxxx$'
alternates '^alias2@xxxxxxxxxx$'
To save typing, I use something like this:
alternates '^kyle-[a-z0-9-]*@memoryhole.net$'
~Kyle
- --
America will never be destroyed from the outside. If we falter and
lose our freedoms, it will be because we destroyed ourselves.
-- Abraham Lincoln
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAkgkxpQACgkQBkIOoMqOI17O/QCfepBB6JRLanwMpvi6s7DvGfXu
mu8AnAon4dOR9o1KmXoNtBXbNeWET93V
=bBU6
-----END PGP SIGNATURE-----