<<< Date Index >>>     <<< Thread Index >>>

Re: group



On Tue, Jul 29, 2008 at 08:43:58PM -0500, Kyle Wheeler wrote:
> 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

Thanks for the good detailed answer.  I have a better idea of group and its use 
now. All i needed was the alias but I thought I had to make a group to be able 
to alias the two addresses.

I now have in my alias file 
alias fargo <daughter@xxxxxxxxx>, <soninlaw@xxxxxxxxx> and it works. I had to 
change the ( to > for it to work. Thats a lot faster than tagging the two .

Thanks for the great help
Tom