Re: Getting aliases from Cc field
- To: mutt-users@xxxxxxxx
- Subject: Re: Getting aliases from Cc field
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Sat, 4 Apr 2009 13:09:05 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=sHUFEou89kIMvCmLeHbHVymHNqM=; b=jSQU W/UdxNHSv3InQn9mPEF/HvB9j3IseXGuWfRgwhWGULtv6Uyz48LXT6hML+iTrBP3 zLrJYgBn1yXl3WJEZiHJHLKbe7zpHuMoP1TjQUkcxTkQZIVSFAWZauCwosRCU7WM xXQneng4gqjhJBmTjUCw/0mNge1quqBCpxhwDvo=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=j4sfNpH5ZzgV4gdxn1CT3QLKJbXfFRLR3cB3UGJZ+51QBjK5S4iRpBgx6j2jYRs7o+xy4hNAGyBGkPPYYAqC1C6BOsPoS/j36/NOOt4FKuQJ1J6o1zbRTAmBDjw1/VOCD4J2TlKTx5z5Pmm8hamxIGZx/JcDMqCVrezSroIJMgI=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <BLU103-W143DD13CF92467601CD740E5860@xxxxxxx>
- 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
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <BLU103-W52AE467281DA00EDC2388EE5860@xxxxxxx> <20090404163808.GG5216@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <BLU103-W143DD13CF92467601CD740E5860@xxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.19 (2009-03-19)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday, April 4 at 05:29 PM, quoth Charles Howard:
>
>Very funny, I don't think.
>
>So let me rephrase my question :
>
>Is there a way to take an address from the Cc field to an alias file,
>similar to how one uses `a' for the From field ?
Sure. Well, to my knowledge, mutt doesn't provide any built-in
mechanism. The simplest way is to create a script that extracts the
contents of the CC field, builds an alias line, and appends it to the
alias file. For example, if you have dialog and procmail
(specifically, procmail's tool formail) installed, here's a basic
script (modify to taste):
#!/bin/sh
aliasfile=~/.aliases
CCheader=$(formail -c -x CC)
string="what alias should I use for $CCheader?"
tmpfile=$(mktemp -t dialog.XXXXXX)
dialog --inputbox "$string" 8 ${#string} 2>"$tmpfile"
retval=$?
if [ $retval == 0 ] ; then
alias=$(cat $tmpfile)
echo "alias $alias $CCheader" >>"$aliasfile"
fi
rm -f $tmpfile
~Kyle
- --
There in America we are descended in blood and in spirit from
revolutionist and rebel men and women who dare to dissent from
accepted doctrine. As their heirs, may we never confuse honest dissent
with disloyal subversion.
-- Dwight D. Eisenhower
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAknXokEACgkQBkIOoMqOI17MFwCgsiEt5Ootuklv10ZTVfB5FI0l
wBQAni+dudKA8+75iOs0XQf78s8nVo3A
=gCyX
-----END PGP SIGNATURE-----