Re: group
- To: mutt-users@xxxxxxxx
- Subject: Re: group
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Tue, 29 Jul 2008 20:43:58 -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=sRKWt63Zv+VUrEvVOLaMbHsK9CA=; b=N2ln NFPSSL3bwNhKkB+TX0QDDi4Cxnk7RQhNhIr4ffL5jTUT1OL7JO6YlyK2+qVRDtZH RXX+j3ifW0NyhQO6q6jzDlKyKnFEjXRkVpuVieyqqTFT2Of4U+6on6w/oISRm84d E6NwIXkxXbxRdG3fJq3JRJme6FADbR70lgMbXi0=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=jqVBeOuKp5JZDFzZ9FZrzM2RdFz8dALpzKfPTCyX0AdnKMCqAqg/07A27wRCsTHVoADNIkHF2SMBCSXEFJisag3SaOqzCY+B++6x7LT1ZpjqvyT6z6kv9Ml2bMGTV3s6ZO3zpXCBo9LvWCysDE/ftFXFG7AZobD8OZTP+erU0ks=; 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: <20080729225946.GA6869@darkstar>
- 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: <20080729225946.GA6869@darkstar>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.18 (2008-07-21)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday, July 29 at 06:59 PM, quoth Tom:
> I would like to set up a group and an alias for that group. I read
> the manual and the wiki and the recent post and still to dumb to
> figure it out. I want the group name to be fargo. I would like the
> alias to be fargo if the group name and alias can be the same.
Sure.
I think you're confusing what "group" means in this context, and
you're making it mean multiple things. As far as mutt is concerned, a
"group" is (more or less) a label that is applied to addresses, while
an alias is a way of referring to one or more addresses. Thus, you
can't say "send a message to group X", but you can say "send a message
to alias Y". Groups are for answering questions like "is the sender a
member of group X".
> The email addreses are daughter@xxxxxxxxx,soninlaw@xxxxxxxxx
Okay, so, first, we set up the alias:
alias fargo (daughter@xxxxxxxxx), (soninlaw@xxxxxxxxx)
Now, to add those to a group, we can do one of two things: we can
either tag the alias command, or we can do a separate group command.
For example, we could replace the previous alias command with this
one:
alias -group fargo fargo (daughter@xxxxxxxxx), (soninlaw@xxxxxxxxx)
OR we can add a second "group" command:
group -group fargo -addr daughter@xxxxxxxxx soninlaw@xxxxxxxxx
Note that no comma is needed for the group command, but it is needed
for the alias command. Also note that you don't need to create a group
before using it!
> In .muttrc I put group -group fargo -addr
> daughter@xxxxxxxxx,soninlaw@xxxxxxxxx
>
> In my alias file whose name is addressbook.txt I put
> alias -group fargo
That didn't work for multiple reasons. First, I'm pretty sure you
don't want the comma in the group command. Second, when you create an
alias you're associating a name with a set of addresses. You can't
associate a name with a group (groups can include things like regular
expressions, and it makes no sense to send a message to a regular
expression).
Or, if you prefer, think of it this way: the -group tag on the alias
command is shorthand for the full-fledged group command, not the other
way around. Thus "alias -group fargo" is saying "create an alias, in
the group fargo, that is..." but is missing all the important
information about the alias that you wish to create.
One of the ways I use groups is for coloring. Say, let's make it so
that email from anyone in my family is colored blue. Now, over the
years, my family members have changed email addresses, and I want to
keep their old emails colored blue, but when I send messages to them,
I only want to send the message to their current address. Thus:
alias -group family dad (dad@xxxxxxxxxxx)
group -group family -addr dadsoldaddress@xxxxxxxxxxx
group -group family -addr anotheroldone@xxxxxxxxxxx
(I could combine those last two lines, but I'm trying to keep these
lines short for the purposes of this email).
Thus, the group "family" contains all three addresses, and I can
create hooks that match on "%C family" that will match everything. For
example:
fcc-save-hook '%C family' =Family
color index blue default '%f family'
And whenever Dad gets a new address, I only have to change the alias,
I don't have to create an additional hook or coloring pattern.
Does that explain things a bit better?
~Kyle
- --
And thou shalt smite the house of Ahab thy master, that I may avenge
the blood of my servants the prophets, and the blood of all the
servants of the LORD, at the hand of Jezebel. For the whole house of
Ahab shall perish.
-- Bible, II Kings (9:7-8)
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAkiPx14ACgkQBkIOoMqOI165ygCgzXdYwUaK1I55pE0crpAFmGWq
DhgAoP0TKQETeDoraRWAVY28gchhBZtv
=J/tH
-----END PGP SIGNATURE-----